You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am currently trying to integrate ZIP compression with minizip-ng 4.0.5 into a Windows application (Windows 10 1809, Visual Studio 2022 17.9.6) and have noticed some unexpected behavior when it comes to empty subdirectories. When a directory tree is added recursively with mz_zip_writer_add_path, an additional top-level directory entry is created in the ZIP file for each empty subdirectory.
Directory tree example (no file extension means directory):
a.txt
b
b\c
b\d.txt
When compressing the example above with the implementation of minizip.c (-9 <OUT_DIR><OUT_FILE>.zip <IN_DIR>) this results in the following ZIP file content when displayed or extracted with the Windows Explorer or 7-Zip:
a.txt
b
c
b\c
b\d.txt
The text was updated successfully, but these errors were encountered:
This is intentional and a change in recent version.
Thank you for the clarification! I don't understand the rationale behind this decision, but it seems odd to me that due to this, directories during extraction will be created that were not part of the input directory tree. Is there any way to disable or work around this behavior (except for removing empty directories from the input)?
I am currently trying to integrate ZIP compression with minizip-ng 4.0.5 into a Windows application (Windows 10 1809, Visual Studio 2022 17.9.6) and have noticed some unexpected behavior when it comes to empty subdirectories. When a directory tree is added recursively with
mz_zip_writer_add_path
, an additional top-level directory entry is created in the ZIP file for each empty subdirectory.Directory tree example (no file extension means directory):
When compressing the example above with the implementation of minizip.c (-9 <OUT_DIR><OUT_FILE>.zip <IN_DIR>) this results in the following ZIP file content when displayed or extracted with the Windows Explorer or 7-Zip:
The text was updated successfully, but these errors were encountered: