Skip to content

Commit

Permalink
Fix previous.
Browse files Browse the repository at this point in the history
  • Loading branch information
dillof committed Aug 23, 2023
1 parent d148b0e commit 25cac21
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/zip_close.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 25cac21

Please sign in to comment.