Skip Menu |
 

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

Report information
The Basics
Id: 99157
Status: new
Priority: 0/
Queue: Archive-Zip

People
Owner: Nobody in particular
Requestors: VJN634 [...] motorolasolutions.com
Cc:
AdminCc:

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



Subject: [Archive::Zip] Impossible unzip a encrypted file.Impossible set password if use read create Zip Object.
Date: Fri, 26 Sep 2014 09:13:02 +0000
To: "bug-Archive-Zip [...] rt.cpan.org" <bug-Archive-Zip [...] rt.cpan.org>
From: Yang Zhipeng-VJN634 <VJN634 [...] motorolasolutions.com>
Download (untitled) / with headers
text/plain 1.1k
Hi, When I use perl to unzip a zip file, which is encrypted, as the Web(https://metacpan.org/pod/Archive::Zip#Archive::Zip-Methods). I got the error message" Can't locate object method "password" via package "Archive::Zip::ZipFileMember" at .\unzip.pl line 16." And my script code as attached. And then, I checked the code of .pm files. I found that if I want to set password, I should get a Member object, but the method memberNamed() return a object of ZipFileMember, because when I use constructor create a Zip Object, it calls read() method, and in read() method, it calls readFromFileHandle(), but in readFromFileHandle(), it create member like this "my $newMember = $self->ZIPMEMBERCLASS->_newFromZipFile( $fh, $fileName, $self->eocdOffset() );", and then "push( @{ $self->{'members'} }, $newMember );". So, you see, if anyone use read to create Zip object, he gets the ZipFileMember objects, rather than Member objects, and he can't set password with these objects. I can't suggest any thing, because I haven't read all codes. I hope this issue can be fixed as soon as possible. Thanks. Best regards N|Z
Download unzip.pl
text/x-perl 559b

Message body is not shown because sender requested not to inline it.



This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.