From 25cac218849824a9f73c22f5449f7ca38dc81365 Mon Sep 17 00:00:00 2001 From: Dieter Baron Date: Wed, 23 Aug 2023 12:50:37 +0200 Subject: [PATCH] Fix previous. --- lib/zip_close.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/zip_close.c b/lib/zip_close.c index a93e04522..ddc2c2456 100644 --- a/lib/zip_close.c +++ b/lib/zip_close.c @@ -396,7 +396,7 @@ add_data(zip_t *za, zip_source_t *src, zip_dirent_t *de, zip_uint32_t changed) { src_final = src; zip_source_keep(src_final); - if (!needs_decrypt && de->encryption_method == ZIP_EM_TRAD_PKWARE && (de->changed & ZIP_DIRENT_LAST_MOD)) { + if (!needs_decrypt && st.encryption_method == ZIP_EM_TRAD_PKWARE && (de->changed & ZIP_DIRENT_LAST_MOD)) { /* PKWare encryption uses the last modification time for password verification, therefore we can't change it without re-encrypting. Ignoring the requested modification time change seems more sensible than failing to close the archive. */ de->changed &= ~ZIP_DIRENT_LAST_MOD; }