Giter Club home page Giter Club logo

Comments (5)

pmqs avatar pmqs commented on June 26, 2024

@victor-bert Can you show me the code you were using?

from archive-zip-simplezip.

pmqs avatar pmqs commented on June 26, 2024

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 avatar victor-bert commented on June 26, 2024

@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.

pmqs avatar pmqs commented on June 26, 2024

Thanks. I see what the issue is.

from archive-zip-simplezip.

pmqs avatar pmqs commented on June 26, 2024

Fixed in change 7694310

from archive-zip-simplezip.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.