Generate ZIP files the same way as Windows

This commit is contained in:
Justine Tunney 2021-03-01 06:24:11 -08:00
parent d932948fb4
commit f4298f10c2
11 changed files with 112 additions and 43 deletions

View file

@ -1,6 +1,6 @@
#!/bin/sh
if [ $MODE = dbg ]; then
if [ "$MODE" = dbg ]; then
exit # TODO
fi

View file

@ -1,6 +1,6 @@
#!/bin/sh
if [ $MODE = dbg ]; then
if [ "$MODE" = dbg ]; then
exit # TODO
fi

View file

@ -93,7 +93,6 @@ TEST(undeflate, testEmbeddedCompressedZipFile_theHardWay) {
ASSERT_GE(ZIP_CDIR_RECORDS(cd), 1);
for (i = 0, cf = map + ZIP_CDIR_OFFSET(cd); i < ZIP_CDIR_RECORDS(cd);
++i, cf += ZIP_CFILE_HDRSIZE(cf)) {
fprintf(stderr, "%.*s\n", ZIP_CFILE_NAMESIZE(cf), ZIP_CFILE_NAME(cf));
if (strncmp("libc/testlib/hyperion.txt", ZIP_CFILE_NAME(cf),
ZIP_CFILE_NAMESIZE(cf)) == 0) {
lf = map + ZIP_CFILE_OFFSET(cf);