Use ditto when creating .zip (PKZip) to preserve the resource forks in .zip archives
- Vorherrschende Sprache
- PHP
- Sterne
- 7.3k
- Forks
- 294
- Ø Merge
- 14 T. 16 Std.
- Gemergte PRs (30 T.)
- 1
Beschreibung
Since ditto can preserve resource forks in a .zip (PKZip format) archive just like the Archive Utility can, without using .tar, there should be an option that uses ditto to create such archives.
This preserves resource forks with hidden files inside a hidden __MACOSX folder inside the .zip archive
`ditto -ckX --rsrc --sequesterRsrc --zlibCompressionLevel 9 folder1 folder1.zip`
This preserves resource forks more like how it is when you use tar, with hidden files inside the archive, but without placing them inside a hidden __MACOSX folder
`ditto -ckX --rsrc --zlibCompressionLevel 9 folder1 folder1.zip`
Regardless which of those two you use, the Archive Utility turns the resource fork data from those hidden files into actual resource forks upon extraction... so those files are visible when you list the contents of the .zip archive in Terminal, but when you list the contents of a directory with ls after the extraction, those don't appear anymore, since they just get turned back into resource forks... but having a hidden __MACOSX folder might be preferable if the archive is also shared with Windows users, for archivers that just extract those hidden files with resource fork data as regular files that are visible on Windows, so those files wouldn't be all over the place.
To avoid confusion, the current "Exclude Mac resource forks" option should be renamed to something else (maybe to "Clean up macOS specific hidden files", since that seems to be the only thing it is doing now and that it isn't related to actual resource forks), as mentioned here https://github.com/aonez/Keka/issues/571
Also... it would be good to have some tooltip that would tell users when they put their mouse pointer over it what kind of files that option actually excludes, so they wouldn't get an impression that it's for something else.
There could be another option then to exclude the resource forks, which should not then appear on 7zip's tab if it doesn't support resource forks anyway and it also shouldn't appear for other compression formats if they are used without tar, since the resource forks also wouldn't be preserved without tar if someone just uses .gz or .xz... and when then option is selected for .zip, then maybe it could just use the 7z binary to create the .zip archives, since it is multithreaded (although compressing to .zip is relatively fast anyway) and when it's unchecked it could just use ditto to create .zip archives.
That way, I think it should be very clear to users who don't know much about what they need to do to preserve the resource forks what they should use to preserve them.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Bewertung
Dieses Issue wurde noch nicht bewertet.