Menu

#8 Abbrevia doesn't archive empty folders (other ZIP utilities

To_Be_Tested
closed-fixed
7
2009-11-03
2003-03-05
Anonymous
No

Exported from Bugzilla, issue 2264.

--- Comment added on 1/15/2002 11:38:01 AM ---
Several customers have complained about this lack in Abbrevia's behavior.
PkWare's APPNOTE doesn't specify explicitly anywhere how empty folders are to be
archived, but clearly PkZip, WinZip, etc. do so.

By inspection it appears that empty directories are included in a ZIP thusly:
- Both a Local and a Central Directory entry for the folder are made
- The filename is set to the path of the directory (sans drive info, and
relative to any base directory, just as for regular filenames
- compression method is given as stored
- both Compressed and Uncompressed sizes are set to 0

I suspect the CD entry "External File Attributes" field includes the DOS/Windows
directory attribute as well, but that's presently untested.

Requirements:
1) Code in AbUtils.AbFindFiles to include empty directories in file list:

procedure AbFindFiles
...
begin
Found := FindFirst( FileMask, SearchAttr, SR );
if Found = 0 then begin
...
end
else begin { empty directory }
if SR.Attr and faDirectory = faDirectory then
FileList.Add(ExtractFilePath(FileMask));
end;
...

2) Remove faDirectory filtering in AbArcTyp.TAbArchive.AddFilesEx

3) Code in AbZipTyp.TAbZipArchive.CreateItem to handle special case of empty
folder

4) Code in AbZipTyp.TAbZipArchive.SaveArchive to handle special case of empty
folder

5) Code to recreate such entries on extraction (proper location presently
uninvestigated)

Discussion

  • Robert Love

    Robert Love - 2004-02-10
    • milestone: --> 284174
     
  • Rohan Williams

    Rohan Williams - 2008-06-22
    • milestone: 284174 --> To_Be_Tested
    • summary: Abbrevia doesn't archive empty folders (other ZIP utilities do) --> Abbrevia doesn't archive empty folders (other ZIP utilities
    • status: open --> closed-duplicate
     
  • Zoë Peterson

    Zoë Peterson - 2009-11-03
    • assigned_to: rohangreg --> capeterson
    • status: closed-duplicate --> open-accepted
     
  • Zoë Peterson

    Zoë Peterson - 2009-11-03

    Fixed in rev 224. Rohan's previous changes stored the empty folders, but didn't support extracting them.

     
  • Zoë Peterson

    Zoë Peterson - 2009-11-03
    • status: open-accepted --> closed-fixed
     

Log in to post a comment.