I have Java code doing the following:
File.createTempFile()
File.delete()
(we only really wanted it to generate a temp file name)com.google.commons.io.ByteStreams.copy()
using a new OutputSupplier
given the same filenameOn a specific system, step 4 fails consistently with FsReadOnlyArchiveFileSystemException - "This is a read-only archive file system!"
(see http://java.net/projects/truezip/lists/users/archive/2011-05/message/9)
Debugging the TrueZIP code, I noticed the following:
Here is what you see in the debugger expressions list:
fn => "C:/myworkdir/temp/myfile4088293380313057223tmp.zip"
java.nio.file.Files.isWritable(java.nio.file.Paths.get(fn)) => false
new java.io.File(fn).canWrite() => true
Using JDK 1.7.04
Any ideas?
There is a bug in java.nio.file.Files.isWritable under windows: it won't take implicit permissions into consideration. java bug #7190897
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With