Skip to main content

[truezip-users] TrueVFS zip append problem on JRE 7 Win 7 [SEC=UNCLASSIFIED]

  • From: "Holden, Lance" <Lance.Holden@...>
  • To: "users@..." <users@...>
  • Subject: [truezip-users] TrueVFS zip append problem on JRE 7 Win 7 [SEC=UNCLASSIFIED]
  • Date: Thu, 19 Dec 2013 23:04:51 +0000
  • Accept-language: en-AU, en-US

UNCLASSIFIED
I've found a situation in the library that drove we insane trying to work it 
out.

I'm on a Windows 7 Enterprise system running Java 7. I used TrueVFS to 
replace a section of zip appending code that unzip all of the contents of one 
stream and added it to a new zip file (with some extra data). If the target 
zip file doesn't exist it is created.

What I found while doing this is that on my system TrueVFS can create the zip 
file in any directory without any problem. This can include any number of cp, 
mv and writer methods into it. When it comes to editing an existing zip file 
this will only work if the file is created in my user directory path. If I'm 
working on some other path with a target zip file that doesn't exist the file 
throws exceptions the exception:

java.nio.file.NotDirectoryException: 
C:\Temp\Test\ResultsAlltemp.zip\Replication_2
      at net.java.truevfs.access.TBIO.cp_r0(TBIO.java:156)
      at net.java.truevfs.access.TBIO.cp_r0(TBIO.java:167)
      at net.java.truevfs.access.TBIO.cp_r(TBIO.java:136)
      at net.java.truevfs.access.TFile.cp_r(TFile.java:2747)

The relevant code section is

            if (!srcIsGhost || !dstArchived || !TConfig.current().isLenient())
                if (!dst.mkdir() && !dst.isDirectory())
                    throw new NotDirectoryException(dst.getPath());

If the file didn't exist the file is created first. If I examine the built 
zip file Replication_1 is in there which is expected.

If the file already existed I get the exception

net.java.truecommons.io.InputException: 
net.java.truevfs.kernel.spec.FsReadOnlyFileSystemException: 
zip:file:/C:/Temp/SimQ/SimQ%20Results/ResultsAlltemp.zip!/
      at net.java.truecommons.io.Streams.copy(Streams.java:93)
      at net.java.truecommons.cio.IoSockets.copy(IoSockets.java:47)
      at net.java.truevfs.access.TBIO.cp0(TBIO.java:216)
      at net.java.truevfs.access.TBIO.cp_r0(TBIO.java:177)
      at net.java.truevfs.access.TBIO.cp_r0(TBIO.java:167)
      at net.java.truevfs.access.TBIO.cp_r0(TBIO.java:167)
      at net.java.truevfs.access.TBIO.cp_r(TBIO.java:136)
      at net.java.truevfs.access.TFile.cp_r(TFile.java:2747)
      ...
Caused by: net.java.truevfs.kernel.spec.FsReadOnlyFileSystemException: 
zip:file:/C:/Temp/SimQ/SimQ%20Results/ResultsAlltemp.zip!/
      at 
net.java.truevfs.kernel.impl.ReadOnlyArchiveFileSystem.make(ReadOnlyArchiveFileSystem.scala:46)
      at 
net.java.truevfs.kernel.impl.ReadOnlyArchiveFileSystem.make(ReadOnlyArchiveFileSystem.scala:24)
      at 
net.java.truevfs.kernel.impl.BasicArchiveController$Output$1.make(BasicArchiveController.scala:177)
      at 
net.java.truevfs.kernel.impl.BasicArchiveController$Output$1.target(BasicArchiveController.scala:110)
      at 
net.java.truevfs.kernel.impl.BasicArchiveController$Output$1.target(BasicArchiveController.scala:108)
      at 
net.java.truecommons.cio.DelegatingOutputSocket.target(DelegatingOutputSocket.java:37)
      at 
net.java.truecommons.cio.DelegatingOutputSocket.target(DelegatingOutputSocket.java:37)
      at 
net.java.truevfs.kernel.impl.SyncController$Output$1$$anonfun$target$2.apply(SyncController.scala:77)
      at 
net.java.truevfs.kernel.impl.SyncController$Output$1$$anonfun$target$2.apply(SyncController.scala:77)
      at 
net.java.truevfs.kernel.impl.SyncController$class.net$java$truevfs$kernel$impl$SyncController$$apply(SyncController.scala:129)
      at 
net.java.truevfs.kernel.impl.SyncController$Output$1.target(SyncController.scala:77)
      at 
net.java.truevfs.kernel.impl.LockController$Output$1$$anonfun$target$2.apply(LockController.scala:78)
      at 
net.java.truevfs.kernel.impl.LockController$Output$1$$anonfun$target$2.apply(LockController.scala:78)
      at 
net.java.truevfs.kernel.impl.LockingStrategy.apply(LockingStrategy.scala:72)
      at 
net.java.truevfs.kernel.impl.LockController$Output$1.target(LockController.scala:78)
      at 
net.java.truecommons.cio.DelegatingOutputSocket.target(DelegatingOutputSocket.java:37)
      at 
net.java.truevfs.kernel.impl.FalsePositiveArchiveController$Output$1$$anonfun$target$2.apply(FalsePositiveArchiveController.scala:116)
      at 
net.java.truevfs.kernel.impl.FalsePositiveArchiveController$Output$1$$anonfun$target$2.apply(FalsePositiveArchiveController.scala:116)
      at 
net.java.truevfs.kernel.impl.FalsePositiveArchiveController$TryChild$.apply(FalsePositiveArchiveController.scala:195)
      at 
net.java.truevfs.kernel.impl.FalsePositiveArchiveController.net$java$truevfs$kernel$impl$FalsePositiveArchiveController$$apply(FalsePositiveArchiveController.scala:172)
      at 
net.java.truevfs.kernel.impl.FalsePositiveArchiveController$Output$1.target(FalsePositiveArchiveController.scala:116)
      at 
net.java.truecommons.cio.AbstractInputSocket.target(AbstractInputSocket.java:41)
      at 
net.java.truevfs.kernel.impl.BasicArchiveController$Input$1.socket(BasicArchiveController.scala:94)
      at 
net.java.truevfs.kernel.impl.BasicArchiveController$Input$1.stream(BasicArchiveController.scala:89)
      at 
net.java.truevfs.kernel.impl.ResourceController$Input$1.stream(ResourceController.scala:42)
      at 
net.java.truevfs.kernel.impl.ResourceController$Input$1.stream(ResourceController.scala:38)
      at 
net.java.truecommons.cio.DelegatingInputSocket.stream(DelegatingInputSocket.java:43)
      at 
net.java.truevfs.kernel.impl.SyncController$Input$1$$anonfun$stream$1.apply(SyncController.scala:65)
      at 
net.java.truevfs.kernel.impl.SyncController$Input$1$$anonfun$stream$1.apply(SyncController.scala:65)
      at 
net.java.truevfs.kernel.impl.SyncController$class.net$java$truevfs$kernel$impl$SyncController$$apply(SyncController.scala:129)
      at 
net.java.truevfs.kernel.impl.SyncController$Input$1.stream(SyncController.scala:65)
      at 
net.java.truevfs.kernel.impl.SyncController$Input$1.stream(SyncController.scala:59)
      at 
net.java.truevfs.kernel.impl.LockController$Input$1$$anonfun$stream$1.apply(LockController.scala:66)
      at 
net.java.truevfs.kernel.impl.LockController$Input$1$$anonfun$stream$1.apply(LockController.scala:66)
      at 
net.java.truevfs.kernel.impl.LockingStrategy.apply(LockingStrategy.scala:84)
      at 
net.java.truevfs.kernel.impl.LockController$Input$1.stream(LockController.scala:66)
      at 
net.java.truevfs.kernel.impl.LockController$Input$1.stream(LockController.scala:60)
      at 
net.java.truevfs.kernel.impl.FinalizeController$Input$1.stream(FinalizeController.scala:31)
      at 
net.java.truevfs.kernel.impl.FinalizeController$Input$1.stream(FinalizeController.scala:27)
      at 
net.java.truevfs.kernel.impl.FalsePositiveArchiveController$Input$1$$anonfun$stream$1.apply(FalsePositiveArchiveController.scala:98)
      at 
net.java.truevfs.kernel.impl.FalsePositiveArchiveController$Input$1$$anonfun$stream$1.apply(FalsePositiveArchiveController.scala:98)
      at 
net.java.truevfs.kernel.impl.FalsePositiveArchiveController$TryChild$.apply(FalsePositiveArchiveController.scala:195)
      at 
net.java.truevfs.kernel.impl.FalsePositiveArchiveController.net$java$truevfs$kernel$impl$FalsePositiveArchiveController$$apply(FalsePositiveArchiveController.scala:172)
      at 
net.java.truevfs.kernel.impl.FalsePositiveArchiveController$Input$1.stream(FalsePositiveArchiveController.scala:98)
      at 
net.java.truecommons.cio.IoSockets$InputAdapter.stream(IoSockets.java:64)
      at net.java.truecommons.io.Streams.copy(Streams.java:91)
      ... 32 more

If I use a directory in my home drive (e.g. C:\Users\userme\) then everything 
works. I can merge data from outside of my home drive (so TrueVFS 
successfully opens and reads those files). Errors occur only when I'm editing 
an existing zip file outside of my user directory.

Is this an expected feature or some bug in the software?

Lance Holden
Analyst Programmer


IMPORTANT: This email remains the property of the Department of Defence and 
is subject to the jurisdiction of section 70 of the Crimes Act 1914. If you 
have received this email in error, you are requested to contact the sender 
and delete the email.


[truezip-users] TrueVFS zip append problem on JRE 7 Win 7 [SEC=UNCLASSIFIED]

Holden, Lance 12/19/2013

[truezip-users] Re: TrueVFS zip append problem on JRE 7 Win 7 [SEC=UNCLASSIFIED]

Christian Schlichtherle 12/19/2013
 
 
Close
loading
Please Confirm
Close