Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Alias (5735)

  (email not shown publicly)

Journal of Alias (5735)

Sunday October 12, 2008
09:10 AM

Archive::Zip now compatible with Windows Explorer!

[ #37645 ]

Happy Days!

I have (I think) FINALLY managed to squash the infamous "Every directory looks like a file in Windows Explorer" in Archive::Zip 1.26 (just uploaded).

It appears the problem is that Windows Explorer expects a particular msdos-mode directory bit to be set, even if the file permissions are described in unix mode.

Fortunately, the bit in question is utterly irrelevant to unix-mode permissions, and so copying the approach of Info-Zip (the "zip" you probably use on UNIX hosts) Archive::Zip now sets BOTH the unix-mode directory bit AND the MS-DOS directory bit when creating directories.

For anyone who wants to reprocess existing ZIP files and repair them, you need to load the ZIP file in Archive::Zip, and do the following for each directory member.

$member->{externalFileAttributes} |= 16;

and then save the zip back over itself.

This has been a massively embarrassing bug, as it results in anything created by Archive::Zip looking "broken" when anyone opens it using the default bundled windows explorer ZIP handling.

But no longer.

The new Strawberry release will ship both with this fix bundled in it, and with the Strawberry .zip distributions having this fix applied to them.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.