SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Dec 2010
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Perl - empty zipped folders in file

    Hi, I use Perl and Archive::Zip to compress my folders.

    Some have sub folders in and that works fine.

    However, included in the zipped file is a folder with blank folders in - these relate to pathway to the one I have zipped. Make sense?

    How do I prevent the empties?
    They take up no space and don't really present a problem, just wondered how to not have them.

    I use

    Code:
    use Archive::Zip;
    use Archive::Zip::Tree;
    my $zip = Archive::Zip->new();
    $zip->addTree('path/to/folder');
    $zip->writeToFileNamed('zippedfilename.zip');
    Hope somebody can shed some light on this.

    (I will also have another question about zippiing after this one.)

  2. #2
    SitePoint Member
    Join Date
    Dec 2010
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Solved. It works okay on live server, the paths problem only came up on a local testbed server.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •