fix: unzipping with backslashes in the name on UNIX#834
Conversation
|
OK, I guess I need to look at the unit tests. |
|
The thing I worry about is if the zip was improperly created in the Windows style of path slashes in the zip entry. It would unzip on Unix anymore. |
|
Do we have Windows sample archives like that? As written in 4.4.17.1, it would not have been allowed in the first place. OK, here is what I suggest: a compile option just like I did in #804 with MZ_TARGET_APPSTORE. Flipping such new compile option would allow for either behaviour. |
f33bdd3 to
68dc2f3
Compare
66a6413 to
05cb9d8
Compare
|
I'll update |
|
OK, next mission, a compile option... |
da7607a to
172eaa0
Compare
172eaa0 to
dfd0058
Compare
If the filepath was previously |
|
For reference, this is the (expected) impact of this PR on default filesystems. Without MZ_PRESERVE_NATIVE_STRUCTURE:
With MZ_PRESERVE_NATIVE_STRUCTURE:
|
minizip-ng 4.0.10 no longer consider backslash as a folder separator, which broke a test in opencolorio. Disable this test. ref: zlib-ng/minizip-ng#834 ref: AcademySoftwareFoundation/OpenColorIO#2157
While #832 was for fixing zipping, this PR is for fixing unzipping.
The expectation is that archiving+unarchiving data on UNIX should preserve its structure, no matter if there are backslashes (or dots) in the name of files or folders.
So backslash should only be seen as a separator on Windows, never on UNIX filesystems.
This is the current behaviour with the default macOS
/usr/bin/zipand/usr/bin/unzipas well as default behaviour in Finder when right-click -> compress, followed by double-click to uncompress.