File Tree: Reduce monitoring to limited changes
Only track new, removed, or renamed files. Tracking Xattr changes was apparently causing the tracker dialog to crash on things like the user changing file type associations, which either added or removed a per- file association xattr, or when clicking Change All, removed this xattr from all associated files tracked by Spotlight. Fixes #361 Signed-off-by: Christopher Snowhill <kode54@gmail.com>main
parent
a640627fe1
commit
dd630ba394
|
@ -145,6 +145,13 @@ static NSURL *defaultMusicDirectory(void) {
|
|||
}
|
||||
|
||||
- (void)pathDidChange:(NSString *)path flags:(FSEventStreamEventFlags)flags {
|
||||
if(!(flags & (kFSEventStreamEventFlagItemCreated |
|
||||
kFSEventStreamEventFlagItemRemoved |
|
||||
kFSEventStreamEventFlagItemRenamed))) {
|
||||
// We only care about changes that would affect whether a file exists, or has a new name
|
||||
// Apparently, Xattr changes are causing crashes in this notification tracker, oops.
|
||||
return;
|
||||
}
|
||||
DLog(@"PATH DID CHANGE: %@", path);
|
||||
// Need to find the corresponding node...and call [node reloadPath], then [self reloadPathNode:node]
|
||||
PathNode *node;
|
||||
|
|
Loading…
Reference in New Issue