From eb6e96f036da6dee10f2d018c9d97eb1be32bb4f Mon Sep 17 00:00:00 2001 From: Justine Tunney Date: Sat, 17 Aug 2024 06:44:51 -0700 Subject: [PATCH] Change InfoZIP to not auto-append .zip to pathname --- third_party/zip/README.cosmo | 1 + third_party/zip/zipfile.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/third_party/zip/README.cosmo b/third_party/zip/README.cosmo index 69fbf8c30..309554994 100644 --- a/third_party/zip/README.cosmo +++ b/third_party/zip/README.cosmo @@ -11,4 +11,5 @@ ORIGIN LOCAL CHANGES - Use Cosmopolitan's PCLMUL optimized CRC32 + - Don't magically append .zip extension to filename argument - Improve find_next_signature() performance using unlocked stdio diff --git a/third_party/zip/zipfile.c b/third_party/zip/zipfile.c index b03470d79..787e73ea4 100644 --- a/third_party/zip/zipfile.c +++ b/third_party/zip/zipfile.c @@ -413,6 +413,10 @@ char *ziptyp(s) if ((t = malloc(strlen(s) + 5)) == NULL) return NULL; strcpy(t, s); + + // [jart] don't magically append .zip extension to filename argument + if (1) return t; + # ifdef __human68k__ _toslash(t); # endif