Skip to content
Snippets Groups Projects
Commit c8c599fd authored by Marco Antognini's avatar Marco Antognini
Browse files

Fix crash in ClassgenPhase

Avoid crash when the temporary directory `tmp` doesn't exists, instead
rely on the default, system-wide temporary directory.
parent a2cc907c
No related branches found
No related tags found
No related merge requests found
......@@ -31,7 +31,7 @@ object ClassgenPhase extends LeonPhase[List[String], List[String]] {
_.getLocation.getPath
}.orElse( for {
// We are in Eclipse. Look in Eclipse plugins to find scala lib
eclipseHome <- Option(System.getenv("ECLIPSE_HOME"))
eclipseHome <- Option(System.getenv("ECLIPSE_HOME"))
pluginsHome = eclipseHome + "/plugins"
plugins <- scala.util.Try(new File(pluginsHome).listFiles().map{ _.getAbsolutePath }).toOption
path <- plugins.find{ _ contains "scala-library"}
......@@ -40,7 +40,7 @@ object ClassgenPhase extends LeonPhase[List[String], List[String]] {
"make sure to set the ECLIPSE_HOME environment variable to your Eclipse installation home directory"
))
val tempOut = Files.createTempDirectory(new File("tmp/").toPath, "classes").toFile
val tempOut = Files.createTempDirectory("classes").toFile
settings.classpath.value = scalaLib
settings.usejavacp.value = false
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment