entries created for directories are not recognized correctly by Windows. The following output from zipinfo -v shows the difference between a zip directory entry created by rubyzip and one created by zipinfo zip.
rubyzip should store directory entries instead of deflating them and rubyzip should set the MSDOS attribute to dir, as zip-info zip does.
========== rubyzip ===========
Central directory entry #2:
empty/
offset of local header from start of archive: 53 (00000035h) bytes
file system or operating system of origin: Unix
version of encoding software: 5.2
minimum file system compatibility required: MS-DOS, OS/2 or NT FAT
minimum software version required to extract: 0.0
compression method: deflated
compression sub-type (deflation): normal
file security status: not encrypted
extended local header: no
file last modified on (DOS date/time): 2006 Nov 15 16:00:48
32-bit CRC value (hex): 00000000
compressed size: 2 bytes
uncompressed size: 0 bytes
length of filename: 6 characters
length of extra field: 0 bytes
length of file comment: 0 characters
disk number on which file begins: disk 1
apparent file type: text
Unix file attributes (040755 octal): drwxr-xr-x
MS-DOS file attributes (00 hex): none
There is no file comment.
========== zip-info zip ===========
Central directory entry #1:
empty/
offset of local header from start of archive: 0 (00000000h) bytes
file system or operating system of origin: Unix
version of encoding software: 2.3
minimum file system compatibility required: MS-DOS, OS/2 or NT FAT
minimum software version required to extract: 1.0
compression method: none (stored)
file security status: not encrypted
extended local header: no
file last modified on (DOS date/time): 2006 Nov 15 16:00:48
file last modified on (UT extra field modtime): 2006 Nov 15 16:00:48 local
file last modified on (UT extra field modtime): 2006 Nov 15 15:00:48 UTC
32-bit CRC value (hex): 00000000
compressed size: 0 bytes
uncompressed size: 0 bytes
length of filename: 6 characters
length of extra field: 13 bytes
length of file comment: 0 characters
disk number on which file begins: disk 1
apparent file type: binary
Unix file attributes (040755 octal): drwxr-xr-x
MS-DOS file attributes (10 hex): dir
The central-directory extra field contains:
- A subfield with ID 0x5455 (universal time) and 5 data bytes.
The local extra field has UTC/GMT modification/access times.
- A subfield with ID 0x7855 (Unix UID/GID) and 0 data bytes.
There is no file comment.
Anonymous