You are viewing a plain text version of this content. The canonical link for it is here.
Posted to zeta-issues@incubator.apache.org by "gggeek (JIRA)" <ji...@apache.org> on 2011/04/10 14:21:05 UTC

[jira] [Created] (ZETACOMP-72) Extra empty files added to created zip file when packing directories explicitly

Extra empty files added to created zip file when packing directories explicitly
-------------------------------------------------------------------------------

                 Key: ZETACOMP-72
                 URL: https://issues.apache.org/jira/browse/ZETACOMP-72
             Project: Zeta Components
          Issue Type: Bug
          Components: Archive
         Environment: win vista sp2 32bit / php 536
            Reporter: gggeek


When adding a bunch of folders and files to an archive, it's nice to be able to also have empty directories in the archive.
And it's nice not to have to scan twice the set of files/folders to determine if any folder to be added is empty or not.

So what I do is:
- scan recursively a folder for any files + folders in it
- pass the resulting list to ezcarchive

What I get is a zip file that, when unzipped, has a 0-byte-sized file next to every folder (note: tested .

I guess this could be fixed by only passing a list of files to the ezcarchive, but I would thus loose empty folders in the archive.

Reading the zip spec (http://www.info-zip.org/doc/) there seems to be no cler cut indication of empty-folders treatment. Some ppl say to add folders using "/." as filename, some say to use a specific extra_header byte...



--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (ZETACOMP-72) Extra empty files added to created zip file when packing directories explicitly

Posted by "gggeek (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZETACOMP-72?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

gggeek updated ZETACOMP-72:
---------------------------

    Attachment: testfolder2.zip

Same zip of an empty folder, obtained via ezc

> Extra empty files added to created zip file when packing directories explicitly
> -------------------------------------------------------------------------------
>
>                 Key: ZETACOMP-72
>                 URL: https://issues.apache.org/jira/browse/ZETACOMP-72
>             Project: Zeta Components
>          Issue Type: Bug
>          Components: Archive
>         Environment: win vista sp2 32bit / php 536
>            Reporter: gggeek
>         Attachments: ezoracle-2.2.0.zip, testfolder1.zip, testfolder2.zip
>
>
> When adding a bunch of folders and files to an archive, it's nice to be able to also have empty directories in the archive.
> And it's nice not to have to scan twice the set of files/folders to determine if any folder to be added is empty or not.
> So what I do is:
> - scan recursively a folder for any files + folders in it
> - pass the resulting list to ezcarchive
> What I get is a zip file that, when unzipped, has a 0-byte-sized file next to every folder (note: decompress tested using total commander, that uses under the hood info-zip code afaik. Using vista native unzipping, it's an empty file!)
> I guess this could be fixed by only passing a list of files to the ezcarchive, but I would thus loose empty folders in the archive.
> Reading the zip spec (http://www.info-zip.org/doc/) there seems to be no cler cut indication of empty-folders treatment. Some ppl say to add folders using "/." as filename, some say to use a specific extra_header byte...

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (ZETACOMP-72) Extra empty files added to created zip file when packing directories explicitly

Posted by "gggeek (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZETACOMP-72?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

gggeek updated ZETACOMP-72:
---------------------------

    Description: 
When adding a bunch of folders and files to an archive, it's nice to be able to also have empty directories in the archive.
And it's nice not to have to scan twice the set of files/folders to determine if any folder to be added is empty or not.

So what I do is:
- scan recursively a folder for any files + folders in it
- pass the resulting list to ezcarchive

What I get is a zip file that, when unzipped, has a 0-byte-sized file next to every folder (note: decompress tested using total commander. Using vista native unzipping, it's empty!)

I guess this could be fixed by only passing a list of files to the ezcarchive, but I would thus loose empty folders in the archive.

Reading the zip spec (http://www.info-zip.org/doc/) there seems to be no cler cut indication of empty-folders treatment. Some ppl say to add folders using "/." as filename, some say to use a specific extra_header byte...



  was:
When adding a bunch of folders and files to an archive, it's nice to be able to also have empty directories in the archive.
And it's nice not to have to scan twice the set of files/folders to determine if any folder to be added is empty or not.

So what I do is:
- scan recursively a folder for any files + folders in it
- pass the resulting list to ezcarchive

What I get is a zip file that, when unzipped, has a 0-byte-sized file next to every folder (note: tested .

I guess this could be fixed by only passing a list of files to the ezcarchive, but I would thus loose empty folders in the archive.

Reading the zip spec (http://www.info-zip.org/doc/) there seems to be no cler cut indication of empty-folders treatment. Some ppl say to add folders using "/." as filename, some say to use a specific extra_header byte...




> Extra empty files added to created zip file when packing directories explicitly
> -------------------------------------------------------------------------------
>
>                 Key: ZETACOMP-72
>                 URL: https://issues.apache.org/jira/browse/ZETACOMP-72
>             Project: Zeta Components
>          Issue Type: Bug
>          Components: Archive
>         Environment: win vista sp2 32bit / php 536
>            Reporter: gggeek
>
> When adding a bunch of folders and files to an archive, it's nice to be able to also have empty directories in the archive.
> And it's nice not to have to scan twice the set of files/folders to determine if any folder to be added is empty or not.
> So what I do is:
> - scan recursively a folder for any files + folders in it
> - pass the resulting list to ezcarchive
> What I get is a zip file that, when unzipped, has a 0-byte-sized file next to every folder (note: decompress tested using total commander. Using vista native unzipping, it's empty!)
> I guess this could be fixed by only passing a list of files to the ezcarchive, but I would thus loose empty folders in the archive.
> Reading the zip spec (http://www.info-zip.org/doc/) there seems to be no cler cut indication of empty-folders treatment. Some ppl say to add folders using "/." as filename, some say to use a specific extra_header byte...

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (ZETACOMP-72) Extra empty files added to created zip file when packing directories explicitly

Posted by "gggeek (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZETACOMP-72?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13018093#comment-13018093 ] 

gggeek commented on ZETACOMP-72:
--------------------------------

Further testing reveals that:
- adding a trailing slash to directory names passed to the ezcarchive makes the end result better: both windows and infozip can successfully unzip a zippped file with a single empty folder in it
- windows still has problems unzippping a more complex zip built by ezcarchive

> Extra empty files added to created zip file when packing directories explicitly
> -------------------------------------------------------------------------------
>
>                 Key: ZETACOMP-72
>                 URL: https://issues.apache.org/jira/browse/ZETACOMP-72
>             Project: Zeta Components
>          Issue Type: Bug
>          Components: Archive
>         Environment: win vista sp2 32bit / php 536
>            Reporter: gggeek
>         Attachments: ezoracle-2.2.0.zip, testfolder1.zip, testfolder2.zip
>
>
> When adding a bunch of folders and files to an archive, it's nice to be able to also have empty directories in the archive.
> And it's nice not to have to scan twice the set of files/folders to determine if any folder to be added is empty or not.
> So what I do is:
> - scan recursively a folder for any files + folders in it
> - pass the resulting list to ezcarchive
> What I get is a zip file that, when unzipped, has a 0-byte-sized file next to every folder (note: decompress tested using total commander, that uses under the hood info-zip code afaik. Using vista native unzipping, it's an empty file!)
> I guess this could be fixed by only passing a list of files to the ezcarchive, but I would thus loose empty folders in the archive.
> Reading the zip spec (http://www.info-zip.org/doc/) there seems to be no cler cut indication of empty-folders treatment. Some ppl say to add folders using "/." as filename, some say to use a specific extra_header byte...

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (ZETACOMP-72) Extra empty files added to created zip file when packing directories explicitly

Posted by "gggeek (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZETACOMP-72?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

gggeek updated ZETACOMP-72:
---------------------------

    Attachment: testfolder1.zip

This file has been created using infozip code, and contains a single empty directory

> Extra empty files added to created zip file when packing directories explicitly
> -------------------------------------------------------------------------------
>
>                 Key: ZETACOMP-72
>                 URL: https://issues.apache.org/jira/browse/ZETACOMP-72
>             Project: Zeta Components
>          Issue Type: Bug
>          Components: Archive
>         Environment: win vista sp2 32bit / php 536
>            Reporter: gggeek
>         Attachments: ezoracle-2.2.0.zip, testfolder1.zip
>
>
> When adding a bunch of folders and files to an archive, it's nice to be able to also have empty directories in the archive.
> And it's nice not to have to scan twice the set of files/folders to determine if any folder to be added is empty or not.
> So what I do is:
> - scan recursively a folder for any files + folders in it
> - pass the resulting list to ezcarchive
> What I get is a zip file that, when unzipped, has a 0-byte-sized file next to every folder (note: decompress tested using total commander, that uses under the hood info-zip code afaik. Using vista native unzipping, it's an empty file!)
> I guess this could be fixed by only passing a list of files to the ezcarchive, but I would thus loose empty folders in the archive.
> Reading the zip spec (http://www.info-zip.org/doc/) there seems to be no cler cut indication of empty-folders treatment. Some ppl say to add folders using "/." as filename, some say to use a specific extra_header byte...

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (ZETACOMP-72) Extra empty files added to created zip file when packing directories explicitly

Posted by "gggeek (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZETACOMP-72?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

gggeek updated ZETACOMP-72:
---------------------------

    Attachment: ezoracle-2.2.0.zip

This file is created by ezcarchive, and presents the "empty files" phenomenon

> Extra empty files added to created zip file when packing directories explicitly
> -------------------------------------------------------------------------------
>
>                 Key: ZETACOMP-72
>                 URL: https://issues.apache.org/jira/browse/ZETACOMP-72
>             Project: Zeta Components
>          Issue Type: Bug
>          Components: Archive
>         Environment: win vista sp2 32bit / php 536
>            Reporter: gggeek
>         Attachments: ezoracle-2.2.0.zip
>
>
> When adding a bunch of folders and files to an archive, it's nice to be able to also have empty directories in the archive.
> And it's nice not to have to scan twice the set of files/folders to determine if any folder to be added is empty or not.
> So what I do is:
> - scan recursively a folder for any files + folders in it
> - pass the resulting list to ezcarchive
> What I get is a zip file that, when unzipped, has a 0-byte-sized file next to every folder (note: decompress tested using total commander, that uses under the hood info-zip code afaik. Using vista native unzipping, it's an empty file!)
> I guess this could be fixed by only passing a list of files to the ezcarchive, but I would thus loose empty folders in the archive.
> Reading the zip spec (http://www.info-zip.org/doc/) there seems to be no cler cut indication of empty-folders treatment. Some ppl say to add folders using "/." as filename, some say to use a specific extra_header byte...

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (ZETACOMP-72) Extra empty files added to created zip file when packing directories explicitly

Posted by "gggeek (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZETACOMP-72?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

gggeek updated ZETACOMP-72:
---------------------------

    Description: 
When adding a bunch of folders and files to an archive, it's nice to be able to also have empty directories in the archive.
And it's nice not to have to scan twice the set of files/folders to determine if any folder to be added is empty or not.

So what I do is:
- scan recursively a folder for any files + folders in it
- pass the resulting list to ezcarchive

What I get is a zip file that, when unzipped, has a 0-byte-sized file next to every folder (note: decompress tested using total commander, that uses under the hood info-zip code afaik. Using vista native unzipping, it's an empty file!)

I guess this could be fixed by only passing a list of files to the ezcarchive, but I would thus loose empty folders in the archive.

Reading the zip spec (http://www.info-zip.org/doc/) there seems to be no cler cut indication of empty-folders treatment. Some ppl say to add folders using "/." as filename, some say to use a specific extra_header byte...



  was:
When adding a bunch of folders and files to an archive, it's nice to be able to also have empty directories in the archive.
And it's nice not to have to scan twice the set of files/folders to determine if any folder to be added is empty or not.

So what I do is:
- scan recursively a folder for any files + folders in it
- pass the resulting list to ezcarchive

What I get is a zip file that, when unzipped, has a 0-byte-sized file next to every folder (note: decompress tested using total commander. Using vista native unzipping, it's empty!)

I guess this could be fixed by only passing a list of files to the ezcarchive, but I would thus loose empty folders in the archive.

Reading the zip spec (http://www.info-zip.org/doc/) there seems to be no cler cut indication of empty-folders treatment. Some ppl say to add folders using "/." as filename, some say to use a specific extra_header byte...




> Extra empty files added to created zip file when packing directories explicitly
> -------------------------------------------------------------------------------
>
>                 Key: ZETACOMP-72
>                 URL: https://issues.apache.org/jira/browse/ZETACOMP-72
>             Project: Zeta Components
>          Issue Type: Bug
>          Components: Archive
>         Environment: win vista sp2 32bit / php 536
>            Reporter: gggeek
>         Attachments: ezoracle-2.2.0.zip
>
>
> When adding a bunch of folders and files to an archive, it's nice to be able to also have empty directories in the archive.
> And it's nice not to have to scan twice the set of files/folders to determine if any folder to be added is empty or not.
> So what I do is:
> - scan recursively a folder for any files + folders in it
> - pass the resulting list to ezcarchive
> What I get is a zip file that, when unzipped, has a 0-byte-sized file next to every folder (note: decompress tested using total commander, that uses under the hood info-zip code afaik. Using vista native unzipping, it's an empty file!)
> I guess this could be fixed by only passing a list of files to the ezcarchive, but I would thus loose empty folders in the archive.
> Reading the zip spec (http://www.info-zip.org/doc/) there seems to be no cler cut indication of empty-folders treatment. Some ppl say to add folders using "/." as filename, some say to use a specific extra_header byte...

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira