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

Lightroom library nodes are not properly removed from fsEvents #55

Open
danielpunkass opened this issue Apr 12, 2012 · 1 comment
Open

Comments

@danielpunkass
Copy link
Contributor

The assertion I added recently to my fork iMedia when an fsEvent is attempted to be registered twice is yielding some fruit: it turns out that the fsEvents registration on behalf of Adobe Lightroom catalog folders are not being removed properly. This is based on an imbalance in the way that -[IMBFSEventsWatcher addPath] and -[IMBFSEventsWatcher removePath] handle normalization of the provided path.

In -addPath, the first thing it does with the path is transform it into a guaranteed folder path suitable for passing to fsEvents:

    path = [self pathToParentFolderOfFile:path];

But in -removePath it uses the provided path verbatim to try to locate an existing registration.

In the case of Lightroom for example, a watched node's path may be:

~/Documents/Lightroom 4 Catalog/Lightroom 4 Catalog.lrcat

In -addPath, the containing folder is obtained and the fsEvents registration made upon:

~/Documents/Lightroom 4 Catalog

But in -removePath, when the original path is provided, it fails to unregister, leaving a now-redundant registration on the queue.

(I intend to provide a patch for this, just logging the bug first).

@danielpunkass danielpunkass reopened this Apr 12, 2012
danielpunkass added a commit to danielpunkass/iMedia that referenced this issue Apr 12, 2012
@danielpunkass
Copy link
Contributor Author

I believe the above change in my fork suitably addresses the issue. pull/merge as you see fit! I would do a pull request but as their is an oustanding pull request it seems to want to coalesce into those changes.

danielpunkass pushed a commit to danielpunkass/iMedia that referenced this issue Dec 24, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant