kMDItemDisplayName is ignored for custom importer types

Originator:stuart.morgan
Number:rdar://7751157 Date Originated:March 13, 20101
Status:Open Resolved:
Product:Mac OS X Product Version:10.6.2
Classification:Other Bug Reproducible:Always
 
Certain Apple-provided types appear to get special treatment when they are displayed in the Finder or the Spotlight search results, showing their kMDItemDisplayName instead of the file name. I can't find any way to get my own types to get the same behavior.

Steps to Reproduce:
1) Declare a custom type
2) Write an importer for it that populates kMDItemDisplayName
3) Import some files
4) Search for them

Expected Results:
kMDItemDisplayName should be shown.

Actual Results:
The raw file name is shown

Notes:
The reason I expect this to work is that the .webbookmark type used by Safari's bookmarks behaves this way. They are flat files, not document bundles, and their names are just UUIDs. When searched for, however, they show the kMDItemDisplayName.

I'm making a new type and importer for Camino bookmarks, and if I name them by UUID that's all that shows up, even though I have compared the output of mdimport -d2 between the two types of files and see no relevant differences.

If there is a way to get this working for third-party importers I would very much like to know the work-around.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!