The extractTree method fails to extract the files like unzip command line tool
$ perl /usr/share/doc/perl-Archive-Zip-1.68/examples/unzipAll.pl writeless.zip
IO error: Can't open file .../temp/writeless/hello.txt for write : Permission denied
at /usr/share/perl5/vendor_perl/Archive/Zip/Member.pm line 566.
Archive::Zip::Member::extractToFileNamed('Archive::Zip::ZipFileMember=HASH(0x22275b8)', '...') called at /usr/share/perl5/vendor_perl/Archive/Zip/Archive.pm line 1237
Archive::Zip::Archive::extractTree('Archive::Zip::Archive=HASH(0x1c30a68)') called at /usr/share/doc/perl-Archive-Zip-1.68/examples/unzipAll.pl line 29
Given a zip file like this where the folder does not have any write permissions inside the zip archive.
The
extractTree
method fails to extract the files likeunzip
command line toolTo create the test archive.
This is also been reported against https://github.com/jib/archive-extract/issues/12 but I'm not sure if both need to be fixed or just one.