2

I've come to understand that in order for Spotlight comments to be viewable in the Finder, the extended attributes have to be written to the appropriate .DS_Store file. The problem is, every time I add Spotlight comments using the Finder's Get Info window, they get picked up by Spotlight for searches but very soon after are no longer viewable in the Finder. (In other words, the information was successfully written to the extended attributes, but not to the .DS_Store file.)

[UPDATE: This may have to do with the number of items that reside in the parent folder of the .DS_Store file. Comments remain visible in test folders that contain very few items.]

Could permissions or ACLs be coming into play?]

According to this answer, it seems the Finder will only correctly write the information to .DS_Store when the Finder is run as root; however, this is extremely inconvenient to have to relaunch the Finder every time I want to add information to the Spotlight Comments field in the Get Info window. (Regardless, I haven't tested if this would even work reliably; somehow, I have my doubts.) [As I suspected, this doesn't work.]

Out of desperation, I've erased my spotlight index and am currently reindexing my entire hard drive. (I've done this many times before, however, without luck.) [This changed nothing.]

The information is there, it's searchable; it just can't be viewed directly in the Finder (which is my primary use case) and therefore can't be edited in the Finder either, without being completely overwritten. It's hard for me to believe Apple would ship something this fundamentally broken. It makes Spotlight comments completely worthless to me. (Are spotlight comments this terrible for everyone else?)

Does anyone know a way to scan a disk/folder for spotlight comments and then write them to their .DS_Store files so they're viewable/editable through the Finder? mdimport doesn't seem to be able to do it.

Alternately, is there a way to rebuild .DS_Store files from first principles like there is with the spotlight index?

Thank you.

  • If for example you add a Spotlight comment for ~/Downloads/, is the comment shown by cat ~/.DS_Store? In the linked question, the problem was that the OP was trying to add comments for files owned by root, so Finder saved the comments in .DS_Store files but not as extended attributes. The Spotlight comments were shown in Finder's information windows, but they were not picked up by Spotlight. When Finder was opened as root, the comments were also saved as extended attributes. – Lri Sep 26 '13 at 7:11
  • My spotlight comments are not being added to the .DS_Store files, confirmed with your suggested cat command. I think this may have something to do with having above a certain number of items in the folder that contains the item(s) I'm trying to add spotlight comments to, as the comments do not disappear as readily in new, nearly-empty folders made for troubleshooting purposes. The more items that are in a folder, the more bloated .DS_Store becomes, and it seems the Finder is not terribly good at managing .DS_Store files of increasing size. – Mathew Sep 26 '13 at 8:15
  • I'm still left wondering, is there a way to rebuild .DS_Store files from first principles like there is with the spotlight index? If not, there should be if the Finder's management of this metadata is as terrible as it seems. – Mathew Sep 26 '13 at 8:16
  • Apple really needs to get on the ball and implement a more robust file system, rather than continuing to bolt things on to HFS. Take Siracusa's advice, already! (And even if they don't, why on earth can't the Finder natively edit and display extended attributes? Why lump them into the apparently already overtaxed .DS_Store files?) – Mathew Sep 26 '13 at 8:39

You must log in to answer this question.

Browse other questions tagged .