www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 20239] New: wrong result when extracting with std.zip

https://issues.dlang.org/show_bug.cgi?id=20239

          Issue ID: 20239
           Summary: wrong result when extracting with std.zip
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: dlang croco-puzzle.com

Created attachment 1761
  --> https://issues.dlang.org/attachment.cgi?id=1761&action=edit
correct zip file, which is handled wrong by std.zip

The attached zip file is a correct zip file according to the specification
https://pkware.cachefly.net/webdocs/APPNOTE/APPNOTE-6.3.5.TXT

It contains a zipped file called "best_language" with content "D". But std.zip
will output "FORTRAN" instead. (By the way, linux tool unzip is tricked too,
gunzip not. I havn't tried other programs yet.)

The file contains a file comment at the end. std.zip detects inside this
comment a central directory and therefore misses the correct central directory.

--
Sep 25 2019