logoalt Hacker News

wqwetoyesterday at 2:05 PM1 replyview on HN

Btw, in ZIP archives there is *no* header field that instructs what the pathname separator character(s) used are.


Replies

JdeBPyesterday at 5:39 PM

In theory there isn't, and everyone is supposed to use forward slash. But in practice there is, because not everyone has stuck to using forward slashes over the decades. Some tools are more forgiving of the differences amongst the various ZIP archive creators than others.

These people having fun with "Unix" versus "FAT" over the past decade are seeing the tip of the iceberg, given that there was a PKZIP for OS/400, there is a PKZIP for z/OS (and a competitor that claims to be cheaper), there are tools of varying degrees of Unixiness for systems like the Atari ST and OS/2, and a whole bunch of things have accrued over the years such as an outright extra header giving alternative filenames specifically for MacOS.

* https://michaelrommel.com/create/2022-12-28-malformed-zip-fi...

* https://unix.stackexchange.com/q/166159/5132

* https://github.com/filebrowser/filebrowser/issues/1768