diff --git a/internal/zinc-persist/src/main/scala/sbt/internal/inc/FileAnalysisStore.scala b/internal/zinc-persist/src/main/scala/sbt/internal/inc/FileAnalysisStore.scala index 4bfc9b6a2..b5947bee0 100644 --- a/internal/zinc-persist/src/main/scala/sbt/internal/inc/FileAnalysisStore.scala +++ b/internal/zinc-persist/src/main/scala/sbt/internal/inc/FileAnalysisStore.scala @@ -14,6 +14,7 @@ package internal package inc import java.io._ +import java.nio.file.Files import java.util.Optional import java.util.zip.{ ZipEntry, ZipInputStream } @@ -87,7 +88,7 @@ object FileAnalysisStore { override def set(contents: AnalysisContents): Unit = { val analysis = contents.getAnalysis val setup = contents.getMiniSetup - val tmpAnalysisFile = File.createTempFile(file.getName, TmpEnding, tmpDir) + val tmpAnalysisFile = Files.createTempFile(tmpDir.toPath, file.getName, TmpEnding).toFile if (!file.getParentFile.exists()) file.getParentFile.mkdirs() @@ -113,7 +114,7 @@ object FileAnalysisStore { def set(analysisContents: AnalysisContents): Unit = { val analysis = analysisContents.getAnalysis val setup = analysisContents.getMiniSetup - val tmpAnalysisFile = File.createTempFile(file.getName, ".tmp", tmpDir) + val tmpAnalysisFile = Files.createTempFile(tmpDir.toPath, file.getName, ".tmp").toFile if (!file.getParentFile.exists()) file.getParentFile.mkdirs() Using.zipOutputStream(new FileOutputStream(tmpAnalysisFile)) { outputStream => val writer = new BufferedWriter(new OutputStreamWriter(outputStream, IO.utf8)) diff --git a/project/Dependencies.scala b/project/Dependencies.scala index ce599400a..bf3c95cc8 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -13,7 +13,7 @@ object Dependencies { val allScalaVersions = Seq(defaultScalaVersion, scala210, scala211, scala213) val scala212_213 = Seq(defaultScalaVersion, scala213) - private val ioVersion = nightlyVersion.getOrElse("1.8.0") + private val ioVersion = nightlyVersion.getOrElse("1.8.1") private val utilVersion = nightlyVersion.getOrElse("1.8.2") private val sbtIO = "org.scala-sbt" %% "io" % ioVersion