agn453 / UNZIP-CPM-Z80

UNZIP and ZIP for CP/M Z80
The Unlicense
34 stars 4 forks source link

Skipping directory names in archive #3

Closed jgharston closed 1 year ago

jgharston commented 2 years ago

quote: ; read a byte at a time, resetting DE everytime a path seperator ; is encountered until all bytes in the filename have been read. ; '/', '\' and ':' are considered path seperators.

This is wrong. The ZIP format specifies that within the archive directories are always seperated by '/' regardless of the platform's own directory characters. directory/directory/file is stored as directory/directory/file directory\directory\file is stored as directory/directory/file directory.directory.file is stored as directory/directory/file directory:directory:file is stored as directory/directory/file always

When creating a ZIP archive the ZIP tool translates the local filename naming system into the ZIP filename naming convention when storing the names in the archive. When extracting from a ZIP archive, the UNZIP tool translates the ZIP filename naming convention into the filename naming convention for the platform it is extracting to.

"ZIP filename format" is close enough to "Unix filename format" as to not make much difference.

agn453 commented 2 years ago

The updates to handle stripping pathnames for extraction to a CP/M files system were contributed by others (noted in the README.md file). I am unable to revise the code at present (since I’m being treated in hospital for lymphoma). Should you wish to revise the code yourself, you’re welcome to clone and push your updates and I’ll merge them into the repository.

jgharston commented 1 year ago

Pushed an update to implement junking paths. See demo screenshots at https://mdfs.net/Apps/Archivers/CPMZip

agn453 commented 1 year ago

Resolved by v1.5-6 release