-
Notifications
You must be signed in to change notification settings - Fork 385
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
Fix: Correctly ignore files that start with a .
(eg. .DS_Store
)
#406
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tagstudio/src/core/library.py
Outdated
else: | ||
entry_id = self.filename_to_entry_id_map.get( | ||
f.relative_to(self.library_dir), None | ||
) | ||
|
||
if entry_id: | ||
# A exclude file is in the library, let's remove it. | ||
self.remove_entry(entry_id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not touching file entries that fall under the exclusion list is intended behavior. This would not only wipe entry data when playing with the exclusion list, but the user wouldn't even be notified of it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will remove this then!
Is this a to broad fix? seems overkill to exclude all files that are hidden under linux/macos/unix just to remove a macos |
That's not how this fix works, it just treats the name of the dot file the same as an extension of a normal file. (Eg excluding |
I also presumed that this was hiding all files with a leading dot as Unix would, my mistake for not reading more closely. I feel treating files with leading dots as toggleable hidden files instead of as extensions would make more sense, since that's how these files are designed to be treated. Plus if you had a file such as ".file.json", this wouldn't be registered as a proper ".json" file despite it being a valid file extension on a Unix hidden file. |
I will try this next week, I had the idea of changing up the system so that uses the same syntax as |
There's actually an issue associated with this (#14) if you'd be interested in taking a stab at it |
This pr adresses 2 issues:
.DS_Store
files doesn't seem to work #399:.DS_Store
files where not ignored, this was caused by the pathlib library treating a file starting with a dot the same as a file without an extension. We now treat the whole filename as the extension in this case.Closes #399