M2Team / NanaZip

The 7-Zip derivative intended for the modern Windows experience
https://sourceforge.net/projects/nanazip/
Other
8.79k stars 222 forks source link

.zip file with \ not working as expected #370

Open soywiz opened 9 months ago

soywiz commented 9 months ago

Folders not appearing correctly in NanaZip:

image

Working properly opening with windows explorer:

image

It is using \ as file separator instead of /:

image

You can find that file here:

https://fastdl.mongodb.org/tools/db/mongodb-database-tools-windows-x86_64-100.3.1.zip

dinhngtu commented 9 months ago

Using backslashes instead of forward slashes as path separator is contrary to the zip specification (see section 4.4.17). So I think the resulting filename is expected behavior.

soywiz commented 9 months ago

Indeed as you noticed that .zip file doesn't strictly adhere to the formal spec. I don't know the reason why that ones was generated, specially from a major project.

I was not able to extract it properly with NanaZip and had to extract it with Windows Explorer. When I extracted it with nanozip it generated strange file names and I was a bit confused at first because I had to rename them manually.

Since \ is probably not a valid character in windows file names, Could by any chance this be taken into account and pragmatically consider both \ and / as folder separator as Windows Explorer does, or at least notify that \ was used as a warning so I know the names are invalid (or both things)?