M2Team / NanaZip

The 7-Zip derivative intended for the modern Windows experience

Home Page:https://sourceforge.net/projects/nanazip/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

.zip file with \ not working as expected

soywiz opened this issue · comments

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

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.

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)?