Closed Bug 335163 Opened 15 years ago Closed 15 years ago
Spotlight metadata folder is deleted and recreated on launch
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/418 (KHTML, like Gecko) Safari/417.9.2 Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:18.104.22.168) Gecko/20060422 Camino/1.0.1 The Mac OS X Spotlight metadata folder for Camino at ~/Library/Caches/Metadata/Camino is deleted and recreated every time Camino is launched. Other application's folder at ~/Library/Caches/Metadata/, including Safari, Entourage and iCal are not deleted and recreated when the corresponding application is launched. This "deleting and recreating" has the implication that it is not possible to exclude Camino's bookmarks from being indexed by Spotlight. The System Preference for Spotlight has a "Privacy" tab where locations can be excluded. Because Camino's metadata folder is deleted and recreated it will disappear from the list of locations in the "Privacy" tab. Reproducible: Always Steps to Reproduce: 1. Do a Get Info on the folder ~/Library/Caches/Metadata/Camino 2. Note the date and time for Created and Modified 3. Add the folder ~/Library/Caches/Metadata/Camino to the "Privacy" tab of the System Preferences for Spotlight 4. Launch and Quit Camino 5. Do a Get Info on the folder ~/Library/Caches/Metadata/Camino 6. Note that date and time for Created and Modified differ from the previously noted. The dates will reflect the date and time that Camino was launched 7. Check the "Privacy" tab of the System Preferences for Spotlight and note that the previously added folder is gone Actual Results: The folder ~/Library/Caches/Metadata/Camino is deleted when Camino is launched Expected Results: The contents of the folder ~/Library/Caches/Metadata/Camino could be updated and/or deleted instead, thereby keeping the reference point. One (I'm looking at you) might ask: "Why do you want exclude this folder from the indexing magic of Spotlight". Ahh, I say, there could be several reasons, but let me briefly mention two: - Privacy. I might have certain bookmarks, maybe even bookmarks containing usernames and passwords, that I'd rather not have indexed. - Suppression of duplicates. I might have bookmarks in several browsers bookmarks file(s). These would be listed twice or more if they were found by Spotlight in these different locations. :-)
I can confirm this on 10.4.5 with Camino 1.0.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Mike, the only thing that needs to be changed here is to delete the contents of that folder rather than the entire folder when we write out updated bookmarks on launch? We should get this for 1.1 and, if it's simple enough, for 1.0.2.
Target Milestone: --- → Camino1.1
yes. the other issue here is that deleting/recreating the folder causes Spotlight to flush its permissions cache and makes the next spotlight query very very slow. I think we should just clear out the contents.
Flags: camino1.0.2? → camino1.0.2+
Would it be OK to put all the metadata files into ~/Library/Caches/Metadata/Camino/Bookmarks, and just delete that Bookmarks folder instead? What is it that causes Spotlight to flush its permissions cache?
(In reply to comment #4) > Would it be OK to put all the metadata files into > ~/Library/Caches/Metadata/Camino/Bookmarks, and just delete that Bookmarks > folder instead? What is it that causes Spotlight to flush its permissions > cache? That seems like it would work. Spotlight only flushes the permissions if the folder it was watching disappears. Since the "Camino" folder wouldn't be disappearing, it wouldn't flush the permissions, assuming the user knows to select the Camino folder and doesn't select the Camino/Bookmarks folder.
deleting and recreating any folder with NSWorkspace flushes the cache. So just doing it a level down doesn't matter, though it would fix this bug. it seems the real fix is not to delete the folder, just the contents.
Depends on: 336497
Fixed by checkin of bug 336497.
Assignee: nobody → sfraser_bugs
You need to log in before you can comment on or make changes to this bug.