File.pathSeparatorChar is the separator for PATH and similar
variables. File.separatorChar is the correct separator for
directories.
Description
The temp file code was using : as the path separator instead of /, leading to paths like /tmp:criterion425512593.json.
How Has This Been Tested?
Running a criterion benchmark yielded
Exception in thread "main" java.nio.file.AccessDeniedException: /tmp:criterion425512593.json
at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:90)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116)
at java.base/sun.nio.fs.UnixFileSystemProvider.newFileChannel(UnixFileSystemProvider.java:178)
at java.base/java.nio.channels.FileChannel.open(FileChannel.java:292)
at eta.base.Utils.fileChannelOpen(Utils.java:600)
at base.system.posix.Internals$c_open1.call(Internals.hs:344)
at base.system.IO$$wa.call(IO.hs:500)
at criterion.criterion.Internal$$wa6.call(Internal.hs:125)
at criterion.criterion.Main$defaultMain3.call(Main.hs:173)
at criterion.criterion.Main$defaultMain2.call(Main.hs:152)
at main.Main$main1.call(Main.hs:20)
at main.Main$main1.applyV(Main.hs)
at eta.runtime.exception.Exception.catch_(Exception.java:129)
at main.Main$main20.call(Main.hs)
at main.Main$DZCmain.call(Main.hs:20)
at main.Main$DZCmain.applyV(Main.hs:20)
at eta.runtime.stg.Closures$EvalLazyIO.enter(Closures.java:152)
at eta.runtime.stg.Capability.schedule(Capability.java:246)
at eta.runtime.stg.Capability.scheduleClosure(Capability.java:202)
at eta.runtime.Runtime.evalLazyIO(Runtime.java:392)
at eta.runtime.Runtime.main(Runtime.java:385)
at eta.main.main(Unknown Source)
After this fix, the criterion benchmark doesn't work (hangs), but at least it doesn't immediately throw this error.
Types of changes
[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
File.pathSeparatorChar is the separator for PATH and similar variables. File.separatorChar is the correct separator for directories.
Description
The temp file code was using
:
as the path separator instead of/
, leading to paths like/tmp:criterion425512593.json
.How Has This Been Tested?
Running a criterion benchmark yielded
After this fix, the criterion benchmark doesn't work (hangs), but at least it doesn't immediately throw this error.
Types of changes
Checklist: