Closed ex0ns closed 3 years ago
The java.nio.file.FileAlreadyExistsException raised when creating an new project on Linux is due to /tmp often being on another filesystem. The Files.move from NIO (https://docs.oracle.com/javase/7/docs/api/java/nio/file/Files.html#move%28java.nio.file.Path,%20java.nio.file.Path,%20java.nio.file.CopyOption...%29) will fail when call with a source and destination not on the same fs.
java.nio.file.FileAlreadyExistsException
/tmp
The simplest way of fixing it would be to replace
tempdir <- Files.createTempDirectory(Some("zio-app-g8"), List.empty).orDie
By the creation of a directory in the current directory such as
tempdir <- ZIO.succeed(Path("./.zio-app-g8")) _ <- Files.createDirectory(tempdir).orDie
Otherwise we would need to list the files and do a copy then delete of the files. Which solution do you think is best ? I can open a PR if need be
Thanks so much for looking into this! I think I can take care of it. I can’t today, but I can open up pr tomorrow. I’ll ping you when I have something, and if you can try it out on Linux that would be splendid!
The
java.nio.file.FileAlreadyExistsException
raised when creating an new project on Linux is due to/tmp
often being on another filesystem. The Files.move from NIO (https://docs.oracle.com/javase/7/docs/api/java/nio/file/Files.html#move%28java.nio.file.Path,%20java.nio.file.Path,%20java.nio.file.CopyOption...%29) will fail when call with a source and destination not on the same fs.The simplest way of fixing it would be to replace
By the creation of a directory in the current directory such as
Otherwise we would need to list the files and do a copy then delete of the files. Which solution do you think is best ? I can open a PR if need be