For example a symbolic link like ~/.config (pointing to a folder) would previously get the custom icon for config files. Now it gets a folder icon (with a link badge).
This belongs in main(), where it is already being set.
It might however be necessary to set it when running tests, although none of the tests seems to fail w/o this.
We now clear the “hidden extension” flag if the user manually adds it.
We also ensure the hidden extension is not ignored by comparing base name with display name. The flag is ignored under certain circumstances.
Comparing base name with display name alone may give a false positive for localized file names.
The implementation of kPaste seems to generate an exception for some users, but I don’t know exactly why, so this should provide some better diagnostics info.
This was disabled in an attempt of avoiding the “do you want to open saved documents from last session?” which appear after a crash.
It doesn’t seem to have any effect though, so just noise in the code.
We previously used a dictionary so that initializing a bundle item object wouldn’t need to know the difference between a full property list and a cached subset. Technically though the previous code had an implicit assertion on the bundle item not being able to rely on the settings values being useful, which is now gone.
The main advantage though is a smaller and more correct cache format.
Effectively it doesn’t change much as cached items are fetched with a file date, but in theory it should now be possible to omit that date (if we can trust that fs-events has always notified us about disk changes).
Since it’s not unlikely that a user will downgrade from a nightly build, we should be prepared to see cache files using a newer (incompatible) file format.
Recording that an item is deleted in the bundle’s info.plist is necessary for TextMate 1.x because it merges all installed bundles, so if the user has a local version, he will still see items from the default version, unless these are indicated to be deleted in the local version.
With 2.0 only delta bundles get merged with a less-local bundle, and when deleting a default item, a delta item is written with the ‘isDeleted’ key set to true.
We need this in a few places and while calling Gestalt() isn’t that much code, that function is deprecated in 10.8 and the alternative is a lot more code, so we don’t want to repeat that once we update the code.