Commit graph

107 commits

Author SHA1 Message Date
camchenry
a8b5210487 Add end-to-end test 2018-10-13 18:16:12 -04:00
Mathijs van de Nes
602952750e Update DEFAULT_VERSION
Use a more sane 'version made by' as we can write Bzip2 files
2018-05-22 23:36:56 +02:00
Mathijs van de Nes
ab9667aa5c Properly write 'version needed' in local file header
'version made by' was used instead of version needed by accident.

Resolves #72
2018-05-22 23:36:56 +02:00
Mathijs van de Nes
fce3836059 Better handling of zips with invalid datetimes
The msdos datetime 0x00000000 is invalid. The Windows API would
(rightfully) return an ERROR_INVALID_PARAMETER for this when converting
it. If it is indeed an invalid error, we now return the zip datetime
'epoch' of 1980-01-01 00:00:00.

Resolves issue #61
2018-02-17 20:05:09 +01:00
Peter Williams
f85b5cb7b8 Add a test for ZIP64 with leading junk.
I constructed this file using a hack from the Zip manpage: if the input to a
Zip compression command is streamed on standard input, the output is given in
ZIP64 format since the tool doesn't know how big the input will be. I modified
the resulting file by adding some leading junk text and editing the non-ZIP64
end-of-central-directory structure to have 0xFFFF for its "number of files"
parameters, to help the test demonstrate that the ZIP64 data are being
properly read. (0xFFFF is the value used in the non-ZIP64 structure if the
archive actually has more than 65535 files.)
2017-08-12 14:42:32 -04:00
Mathijs van de Nes
2dae0d4a5c Add regression test for #40 2017-07-05 21:36:47 +02:00
Jos van den Oever
93f676fa57 Add two simple tests. 2017-03-14 20:16:51 +01:00