Skip Menu |

This queue is for tickets about the Archive-Zip CPAN distribution.

Report information
The Basics
Id: 24036
Status: resolved
Priority: 0/
Queue: Archive-Zip

People
Owner: Nobody in particular
Requestors: Simon.Castle [...] jeppesen.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: WinXP Explorer Exposes Problems
Date: Thu, 21 Dec 2006 16:45:20 +0100
To: bug-Archive-Zip [...] rt.cpan.org
From: Simon.Castle [...] jeppesen.com
Download (untitled)
image/gif 12.4k
(untitled)
Download (untitled)
image/gif 12.3k
(untitled)
Download (untitled)
image/gif 11.6k
(untitled)
Download (untitled)
image/gif 11.9k
(untitled)
Hi when I create a zip tree with an empty dir and "Explore" the .zip in XP it incorrectly shows the empty dir as a file, also dirs may be show as both a file and folder. Zips created via "Zip 2.3" do not have this problem. Info:- OS WinXP sp2 Perl cygwin perl5 (revision 5 version 8 subversion 7) and Perl ActiveState perl5 (revision 5 version 8 subversion 8) Both with Archive::Zip 1.18 Although the Zip looks wrong, when I extract it its fine, WinZip/WinRar do not show this. test script ###################### #!/usr/bin/perl #!/c/perl/bin/perl mkdir "dir_1"; `echo text > dir_1/file.txt`; mkdir "dir_1/empty_dir"; use Archive::Zip qw( :ERROR_CODES :CONSTANTS ); my $zip = Archive::Zip->new(); my $member = $zip->addTree( "dir_1", "dir_1" ); $zip->writeToFileNamed("perl.zip"); #################### Run the script, open up explorer, right click on perl.zip and select explore. dir_1 is shown as two entries, should only be a folder. click into dir_1 and the empty_dir is shown as a file. ############################## what I would expect to see zip zipcmd.zip -r dir_1 Hope you can reproduce the same results. Thanks for any help. ... Simon Castle
Resolved in 1.26. Gave up trying to match the behaviour to the spec, and just generated a known-good archive in GNU zip on linux, and emulated it's method for making Windows play nicely when using UNIX-platform permissions. For compatibility, it sets the useless-on-unix 5th bit of the externalFileAttributes property to on, which is the same bit that WinZip uses on Windows (although it uses MSDOS-mode attributes and doesn't set anything else). This appears to fix the problem, at least in superficial testing.