Results 1 to 4 of 4
  1. #1
    Join Date
    May 2010
    Posts
    2

    Exclamation BUG report : duplicate files in a zip archive not displayed

    Hi,

    I'm using Beyond Compare 3.1.11, build 12204 (trial version with Pro features) and I found an annoying bug.

    When I compare 2 zip files using "directory comparison", Beyond Compare 3 is not able to display and compare multiple files of the same fully-qualified name within archives.
    I mean, zip format allows multiple files of the same fully-qualified name to exist within a single archive, and BC3 can't display those multiple files (only one of the two is displayed and compared). So in my case the comparison was wrong, as I did not receive any information telling me that one of my two zip file had 2 files of the same fully-qualified name within the archive...

    For your information, such a zip file (with multiple files of the same fully-qualified name) was generated using an Ant task. See http://ant.apache.org/manual/Tasks/zip.html for details.

    Hope this'll be fixed soon !
    Thanks

  2. #2
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,618

    Default

    Hello Ken,

    From the article you linked to:
    Please note that the zip format allows multiple files of the same fully-qualified name to exist within a single archive. This has been documented as causing various problems for unsuspecting users. If you wish to avoid this behavior you must set the duplicate attribute to a value other than its default, "add".
    The first solution I would recommend would be to avoid duplicate names. The Zip format supports some behavior that does not directly translate into a logical directory comparison.

    In these cases you can use the Hex Compare or treat the zips as files and run a Binary comparison on them. These would compare the zip files bit by bit, and would let you know if there were any differences between the two files.

    If you could attach an example zip, or send it to us in an email (with a link back to this forum post) to support@scootersoftware.com , we would appreciate it as a test case and could look into adding a log message.
    Aaron P Scooter Software

  3. #3
    Join Date
    May 2010
    Posts
    2

    Default

    Hello Aaron,

    Quote Originally Posted by Aaron View Post
    The first solution I would recommend would be to avoid duplicate names. The Zip format supports some behavior that does not directly translate into a logical directory comparison.
    Yes, you're absolutely right. But I'm using BC3 to compare ZIP files (generated by Ant) between SVN revisions. Before I read this part of the Ant documentation, I didn't knew that the ZIP file format allows multiple files of the same fully-qualified name to exist within a single archive... I discovered that after hours trying to find out what were the modifications between two revisions (one without multiple files in the ZIP archive, and the other with multiple files in the ZIP), and BC3 wasn't able to notify me about this difference.

    Since I discovered this particular ZIP format specification, I've modified my Ant task that is generating my zip files so it's not duplicating files anymore. But I think that BC3 should be able to warn the user about that.


    Quote Originally Posted by Aaron View Post
    In these cases you can use the Hex Compare or treat the zips as files and run a Binary comparison on them. These would compare the zip files bit by bit, and would let you know if there were any differences between the two files.
    The problem is that equivalent ZIP files (i.e. compressing the same data) may be totally different if you compare them using a binary comparison because of multiple factors : tool used to create the ZIP, compression ratio, generation time...etc.
    The "directory comparison" for archive files is in my opinion one of the very best features of BC3, as it allows to compare what's inside archives, and not the archives themselves.
    A directory comparison tells the user exactly what's different between two archives, and a binary comparison only tells the user "your files are different (or not)" and it's sometimes not significant at all, as depending on how the archives were build, what's inside them might be identical, even if archives are different.

    Quote Originally Posted by Aaron View Post
    If you could attach an example zip, or send it to us in an email (with a link back to this forum post) to support@scootersoftware.com , we would appreciate it as a test case and could look into adding a log message.
    Here's an attached ZIP example that contains two times the "test.txt" file. I don't know how the different archive tools (winzip, winrar...) behave with this kind of file, but at least the last version of 7zip (http://www.7-zip.org/) is able to display the two files "test.txt" files within the archive.

    Thanks a lot for your reply,
    violent_ken

  4. #4
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,618

    Default

    Thanks for the sample file. I've created an entry to track this issue.
    Aaron P Scooter Software

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •