10

When a symlink is created, it gets the icon of the target folder (with the addition of a black arrow in the lower left corner). The issue I am having is that the symlink icon does not update when the icon of the target folder changes. Deleting and recreating the symlink does not fetch a new icon from the target folder: the symlink continues to show the old icon.

What's strage though is that if I right click and "Get Info.." on the symlink, it shows the correct icons in the information pane... but in the finder window itself, the icon is out of date. This leads me to believe there is some cache for the actual icon that is displayed in the finder window, and it needs to be refreshed.

The issue can be recreated fairly easily:

  1. Create a folder on Desktop called "Target Folder"
  2. Right click Target Folder, Get Info.. and paste any icon from another folder.
  3. Create a symlink on the Desktop called "Symbolic Folder" that links to Target Folder. (Symbolic Folder will now have the same icon as Target Folder).
  4. Right click Target Folder, Get Info.. and paste a new, different icon. (Symbolic Folder does not update and will continue to show the old icon)
  5. Right click Symbolic Folder, Get Info.. the information pane shows the correct icon.

Any idea how to get Symbolic Folder to show the new icon in the Finder window?

This issue has come up due to Yosemite's change of the folder icon style. I use symlinks to link my main user folders (Pictures, Movies, Music, etc) to folders in Dropbox, and many of my symlink icons continue to show the old, pre-Yosemite folder icons even though I have updated the icons of the folders they link to. I'd like to be able to clear out all of the old folder icons.

This post seems relevant, but the solution did not work for me:

wrong icon of Unix symbolic link in Finder

UPDATE The "caching" of the incorrect symlink icon happens only in the "view mode" where the icon of the target folder is changed. So if you follow the steps above in a Finder window where the view mode is set to "icon" then the issue will persist only in Finder windows where the view mode is set to "icon". If you are browsing in a Finder window where the view mode is set to "cover flow" or "list" then the symlink functions correctly and the icon tracks the icon of the target folder just fine (until, that is, you change this icon of the target folder in either the cover flow or list view modes). This explains why the information pane for the symlink shows the correct icon.

4 Answers 4

3

I had this problem and the following seems to have resolved it. I'm not sure if steps 2 and 3 are both required so you can try one and then the other if you prefer.

  1. Remove symbolic links
  2. Clear your icon cache:

    sudo find /private/var/folders/ -name com.apple.dock.iconcache -exec rm {} \;

  3. Clear your caches:

    sudo rm -rf /Library/Caches/*

    sudo rm -rf ~/Library/Caches/*

  4. Restart

  5. Recreate symbolic links
1
  • This worked! I did skip step two and had success. Thanks.
    – adekom
    Commented Nov 15, 2014 at 18:42
2

As noted above, the issue is the icon cache. Clearing all of your caches will work, but I'm not a fan of blunderbus approaches.

Deleting ONLY the icon cache, if you'd prefer a more targeted fix, will work just as well.

The icon cache lives here:

/Library/Caches/com.apple.iconservices.store

Deleting just this folder and restarting will change the icons back to what they should be.

1
  • That path does not exist on Yosemite, which is what this question is about.
    – tubedogg
    Commented Apr 15, 2015 at 22:10
0

If you change the icon in the alias's info window, and it doesn't update when you close the info window, simply make an alias of that alias, and the new icon will appear as expected. Now delete the alias with the bad icon, as the alias you made from it, is actually an alias of the original folder.

1
  • Aliases and symlinks are not the same thing.
    – tubedogg
    Commented Apr 15, 2015 at 22:10
0

If you don't mind changing the date on the symlink you can run touch -h <symlinkfilename> in Terminal. touch updates the last modified time on a file to the current time. With the -h switch it will update the last modified time on the symlink itself rather than the file it points to. This seems to be enough to trigger Finder to rebuild its cache.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .