Menu

zip file within rar file causing problems

Help
2016-02-25
2016-02-29
  • Bill Sterns

    Bill Sterns - 2016-02-25

    Hi, I'm using the 7-Zip-JBinding library to extract archives, and I ran across an unusual problem involving rar files. If the library processes a rar file with three documents in it, they all extract just fine, and if I call IInArchive.getNumberOfItems() for the archive, it returns 3. However, let's say I add a zip file to this rar file, which contains a single file within it. When I try to extract the rar file, IInArchive.getNumberOfItems() returns 1, and the code actually goes into the zip file and extracts the contents of it. It then ignores any other files that were within the rar file.

    This only seems to happen with zip files. If I stick a .7z file in the rar file, or another rar file, all of the files are extracted just fine.

    Any ideas would be appreciated.

    Thanks,
    -Bill

     
  • Bill Sterns

    Bill Sterns - 2016-02-25

    Thanks for looking into the problem, I appreciate it. I tried the new 15.09 library, but unfortunately, it crashed my JVM when I tried using it. It crashed when I called the IInArchive.getProperty() method within my implementation of the IArchiveExtractCallback.getStream() callback:

    inArchive = SevenZip.openInArchive(null, new RandomAccessFileInStream(file));
    ....
    (String) inArchive.getProperty(index, PropID.PATH); // <-- The code crashed here.

    RIght before this statement, the following line executed successfully:

    (Boolean) inArchive.getProperty(index, PropID.IS_FOLDER);

    So, it looks like it's something to do with PropID.PATH, rather than the getProperty() method.

    Thanks,

    -Bill

     
  • Bill Sterns

    Bill Sterns - 2016-02-25

    One other thing I should mention, this problem only happens with the 9.20-2.00beta release. I tried testing the same rar file with the previous 4.65-1.06rc-extr-only release, and the problem does not happen.

    -Bill

     
  • Boris Brodski

    Boris Brodski - 2016-02-26

    Did you tried the new version on Windows or Mac?

    Did you treid to extract the same RAR file with 7-zip or p7zip v9.20 or v15.09 on linux/mac?

    Thank you!

     
  • Bill Sterns

    Bill Sterns - 2016-02-27

    I tried the new 64-bit Windows version on a Windows 7 machine. I can use 7-zip to extract the file with no problems.

     
  • Boris Brodski

    Boris Brodski - 2016-02-29

    I created a bug to track the progress: https://sourceforge.net/p/sevenzipjbind/bugs/20/

     

Log in to post a comment.