ExifTool Forum

ExifTool => Bug Reports / Feature Requests => Topic started by: Anonan on June 22, 2019, 06:23:03 AM

Title: ExifTool sees only the first file of a zip archive
Post by: Anonan on June 22, 2019, 06:23:03 AM
ExifTool shows only one file in a zip archive. It looks like a bug. (http://exiftool.sourceforge.net/TagNames/ZIP.html)

I use
exiftool -g3 test.zip
I get
---- Main ----
ExifTool Version Number         : 11.52
File Name                       : test.zip
Directory                       : .
File Size                       : 1259 kB
File Modification Date/Time     : 2019:06:22 13:00:00+00:00
File Access Date/Time           : 2019:06:22 13:00:00+00:00
File Creation Date/Time         : 2019:06:22 13:00:00+00:00
File Permissions                : rw-rw-rw-
File Type                       : ZIP
File Type Extension             : zip
MIME Type                       : application/zip
---- Doc1 ----
Zip Required Version            : 20
Zip Bit Flag                    : 0
Zip Compression                 : Deflated
Zip Modify Date                 : 2019:06:22 13:05:36
Zip CRC                         : 0x9af40ba4
Zip Compressed Size             : 430344
Zip Uncompressed Size           : 431488
Zip File Name                   : 1.jpg

But the archive contains more than one file.

Windows 10, 64. I have used exiftool 25 and 52 versions.
Title: Re: ExifTool sees only the first file of a zip archive
Post by: Phil Harvey on June 22, 2019, 06:41:14 AM
Could you send me the file so I can take a look?  My email is philharvey66 at gmail.com

Note that ExifTool relies on an external library for ZIP file support, so there may not be much I can do about this.

- Phil
Title: Re: ExifTool sees only the first file of a zip archive
Post by: Anonan on June 22, 2019, 06:49:38 AM
Here is it.

ExifTool Version Number         : 11.52
File Name                       : 1.zip
Directory                       : .
File Size                       : 1056 bytes
File Modification Date/Time     : 2019:06:22 13:47:00+00:00
File Access Date/Time           : 2019:06:22 13:47:00+00:00
File Creation Date/Time         : 2019:06:22 13:46:00+00:00
File Permissions                : rw-rw-rw-
File Type                       : ZIP
File Type Extension             : zip
MIME Type                       : application/zip
---- Doc1 ----
Zip Required Version            : 20
Zip Bit Flag                    : 0
Zip Compression                 : Deflated
Zip Modify Date                 : 2019:06:22 13:45:00
Zip CRC                         : 0xd46b78d6
Zip Compressed Size             : 235
Zip Uncompressed Size           : 9023
Zip File Name                   : 1.png
Title: Re: ExifTool sees only the first file of a zip archive
Post by: Phil Harvey on June 22, 2019, 06:55:54 AM
OK.  There is hope.  ExifTool sees all 3 files on the Mac.  I'm probably using a different version of Archive::Zip here.  I'll check what version I've packaged in the Windows distribution, and update it if necessary.  You can see the version with this command:

> exiftool -ver -v
ExifTool version 11.15
Perl version 5.018004 (-C0)
Platform: darwin
Optional libraries:
  Archive::Zip                 1.37
  Compress::Zlib               2.06
  Digest::MD5                  2.52
  Digest::SHA                  5.84_02
  IO::Compress::Bzip2          2.060
  POSIX::strptime              0.13
  Unicode::LineBreak           2016.003
  IO::Compress::RawDeflate     2.060
  IO::Uncompress::RawInflate   2.060


- Phil
Title: Re: ExifTool sees only the first file of a zip archive
Post by: Phil Harvey on June 22, 2019, 06:58:09 AM
Oh, wait.  You need to use the -a option to see duplicate tags!
Title: Re: ExifTool sees only the first file of a zip archive
Post by: Anonan on June 22, 2019, 07:01:07 AM
My output:
ExifTool version 11.52
Perl version 5.024000 (-C0)
Platform: MSWin32
Optional libraries:
  Archive::Zip                 1.47
  Compress::Zlib               2.069
  Digest::MD5                  2.54
  Digest::SHA                  5.95
  IO::Compress::Bzip2          2.069
  Time::Piece                  1.31
  Unicode::LineBreak           (not installed)
  IO::Compress::RawDeflate     2.069
  IO::Uncompress::RawInflate   2.069
  Win32::API                   0.84
  Win32::FindFile              0.15
  Win32API::File               0.1203


It works.
$ exiftool -g3 -a 1.zip
Now:
---- Main ----
ExifTool Version Number         : 11.52
File Name                       : 1.zip
Directory                       : .
File Size                       : 1056 bytes
File Modification Date/Time     : 2019:06:22 13:58:00+00:00
File Access Date/Time           : 2019:06:22 13:58:00+00:00
File Creation Date/Time         : 2019:06:22 13:58:00+00:00
File Permissions                : rw-rw-rw-
File Type                       : ZIP
File Type Extension             : zip
MIME Type                       : application/zip
---- Doc1 ----
Zip Required Version            : 20
Zip Bit Flag                    : 0
Zip Compression                 : Deflated
Zip Modify Date                 : 2019:06:22 13:45:00
Zip CRC                         : 0xd46b78d6
Zip Compressed Size             : 235
Zip Uncompressed Size           : 9023
Zip File Name                   : 1.png
---- Doc2 ----
Zip Required Version            : 20
Zip Bit Flag                    : 0
Zip Compression                 : Deflated
Zip Modify Date                 : 2019:06:22 13:45:00
Zip CRC                         : 0xeecd91dd
Zip Compressed Size             : 237
Zip Uncompressed Size           : 9024
Zip File Name                   : 2.png
---- Doc3 ----
Zip Required Version            : 20
Zip Bit Flag                    : 0
Zip Compression                 : Deflated
Zip Modify Date                 : 2019:06:22 13:47:00
Zip CRC                         : 0x27346380
Zip Compressed Size             : 232
Zip Uncompressed Size           : 9025
Zip File Name                   : 3.png
Title: Re: ExifTool sees only the first file of a zip archive
Post by: Phil Harvey on June 22, 2019, 07:10:14 AM
I'm surprised this hasn't come up more.  Maybe I should add a warning if extracting ZIP file contents without the -a option.

- Phil