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

BannedFiles exclusion for MacOS resource files when not running on macos #658

Open
satmandu opened this issue Jan 27, 2025 · 2 comments
Open
Labels
fixed in next release fix delivered in the next stable version

Comments

@satmandu
Copy link

satmandu commented Jan 27, 2025

I have to rebuild without the /._*`, // MacOS resource files lines in adapters/[folder,googlePhotos]/options.go because I have many files that fit that regex. I'm not running macOS on my extract and upload machine, so I'm not worried about macOS resource files.

Would you consider making that a default option only for users on macOS, perhaps only adding that if the platform is detected as Darwin?

Alternatively, consider having (or removing that regex) a configurable option?

@satmandu
Copy link
Author

satmandu commented Jan 27, 2025

Maybe this regex would work: .*(?:(?<=\/)\._.*|^\._.*)

https://regex101.com/r/eZ9c3G/6

That only matches the last three lines of:

PXL_20201216_231642389._exported_391_1608160638.jpg
Photos from 2020/PXL_20201216_231642389._exported_391_1608160638.jpg
._exported_391_1608160638.jpg
path/to/the/files/._resourcefile
._resourcefile

@simulot
Copy link
Owner

simulot commented Jan 27, 2025

This regexp doesn't work for GO programs.

The current next branch now convert the glob /._* into the regexp (^|/)\._.*
https://regex101.com/r/Thxy0m/1

Your files are not banned anymore.

@simulot simulot added the fixed in next release fix delivered in the next stable version label Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed in next release fix delivered in the next stable version
Projects
None yet
Development

No branches or pull requests

2 participants