Skip to content

Commit

Permalink
Merge pull request #1 from dvallejo/patch-1
Browse files Browse the repository at this point in the history
Update statements.scala
  • Loading branch information
JSantosP committed Dec 1, 2015
2 parents 7895de8 + d024ebd commit 9488080
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/scala/dsl/statements.scala
Expand Up @@ -39,7 +39,7 @@ trait statements {
context.env.get("FILE") match {
case Some(file:File) =>
try {
(context,io.Source.fromFile(getClass.getResource(s"/${file.name}").toString.drop("file:".size)).mkString )
(context,io.Source.fromFile(getClass.getResource(s"/${file.name}").getFile).mkString )
} catch {
case _:Throwable =>
(context.copy(exceptionThrown=true),"ERROR! FILE WOZ NT FOUND")
Expand All @@ -63,4 +63,4 @@ trait statements {
else if (exceptionCondition.isDefined) (exceptionCondition.get.execute._1, "O NOES")
else (context,"DID NOTHING")
}
}
}

0 comments on commit 9488080

Please sign in to comment.