Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ciderpress adds invisible macOS files/DS_Store #44

Open
frankmilliron opened this issue Feb 23, 2025 · 2 comments
Open

Ciderpress adds invisible macOS files/DS_Store #44

frankmilliron opened this issue Feb 23, 2025 · 2 comments
Labels
enhancement New feature or request

Comments

@frankmilliron
Copy link

Hello! I use Ciderpress in a cross-platform setup, and I was wondering if CP2 could skip adding the invisible .DS_Store files.

@fadden fadden added the enhancement New feature or request label Feb 23, 2025
@fadden
Copy link
Owner

fadden commented Feb 23, 2025

The .DS_Store files are created by the macOS Finder. They can be something of a nuisance.

I believe the current CP2 behavior mimics that of ZIP, so I don't think changing the default behavior is a good idea (based on the "principle of least surprise"). Anything that generally affects "invisible" files might also affect the ._ AppleDouble files that hold attributes and resource forks, so the new behavior would need to single the .DS_Store files out by name.

We could use a simple "no DS_Store" setting, or a general .gitignore-style exclusion list, set in the .cp2rc file.

Alternatively, it's possible to remove the files with wildcards, but you need to do it for each directory level, i.e.
$ cp2 delete archive.zip "*.DS_Store" "*/*.DS_Store" "*/*/*.DS_Store"
which is sort of cumbersome. You can also script it, e.g.
$ cp2 list archive.zip | grep .DS_Store | tr \\n \\0 | xargs -0 cp2 delete archive.zip
(this is why the list command exists... the tr command is needed in case directory names have spaces in them, and xargs -d may not work on macOS).

@frankmilliron
Copy link
Author

Thanks for your response. Yes sometimes I just nuke them with a rm -rf ._* on the mac first. I had to mix around the image folder structure again anyway, so it wasn't a big deal to delete them. I was just surprised to see them there, as I don't recall running into it with CP1. I have my ZIP app on the mac also set to not include them, so a setting would be a nice addition, even if I have to dig into a text file. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants