Comments (5)
@victor-bert Can you show me the code you were using?
from archive-zip-simplezip.
Is this the issue?
First create a zip file
# echo abcd | zip /tmp/x.zip -
updating: - (stored 0%)
The run this code
use warnings;
use strict;
use Archive::Zip::SimpleUnzip qw($SimpleUnzipError) ;
my $zipfile = "/tmp/x.zip";
my $z = new Archive::Zip::SimpleUnzip $zipfile
or die "Cannot open zip file: $SimpleUnzipError\n" ;
while (my $member = $z->next())
{
my $name = $member->name();
print "member $name\n" ;
my $fh = $member->open();
while (<$fh>)
{
}
$member->extract("out")
or die "cannot extact: $SimpleUnzipError\n";
}
And finally note that the file out
is empty.
# ls -l out
-rw-rw-r-- 1 root root 0 Oct 24 16:45 out
from archive-zip-simplezip.
@victor-bert Can you show me the code you were using?
Here my code:
use feature qw/say/;
my $zip = new Archive::Zip::SimpleUnzip($zipfile)
or die "Cannot open zip file: $SimpleUnzipError\n" ;
my $member = $zip->member('example.txt');
say $member->content; # need to check content
$member->extract($path); # inside extract() content is empty, file extracted empty
from archive-zip-simplezip.
Thanks. I see what the issue is.
from archive-zip-simplezip.
Fixed in change 7694310
from archive-zip-simplezip.
Related Issues (14)
- Document and/or Police Zip-Slip vulnerability
- Version mismatches in t/000prereq.t HOT 2
- 111const-deflate.t running more tests than expected HOT 3
- Broken cpan release HOT 1
- Test failures when optional modules not present or wrong version HOT 2
- AutoFlush broken HOT 2
- SimpleZip does not work with all eligible IO::Compress::Zip parameters HOT 1
- Broken: missing lzma.h HOT 4
- Test failures in t/000prereq.t - IO::Compress::Bzip2 version is 2.102, need 2.096 HOT 3
- Error when i try extract file to full path HOT 3
- uncompr error with content() HOT 2
- t/010main-unzip.t fails HOT 2
- Add IO::Compress::Lzma to PREREQ_PM HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from archive-zip-simplezip.