Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

th0masp

macrumors 6502a
Original poster
Preamble: When I searched for solutions to my issue I mainly found references to custom folder icons misbehaving in older OS versions. This right here might be something different.

So, OS is Tahoe, offending icons are stored on an external drive using exFat filesystem.

I keep a bunch of shellscripts (.command filetype) handy on there with custom icons applied to make them out quickly. The icons were applied by pasting an image in the 'Get Info' dialog. Works fine in older OS releases but in Tahoe they are bugged and replaced with the default shellscript icon.

What happens is that in a fresh Finder window some of them show up briefly, others just use the default icon. As soon as any action is performed on that window (including performing selections or changing the display mode) all the custom icons get replaced with the default one. I can 'killall Finder', navigate to the icons and again - displayed as long as they are not being interacted with.

Any idea what might be the issue here? Some overzealous security setting perhaps? Something related to external drives or the fact I'm using exFat? Already tried cleaning out icon caches to no avail.
 
Could have really thought of that myself, couldn't I? 😀

And does this happen to the same files if you copy them to your Mac drive?

Yeah, works fine on the internal drive. But of course that's not where they should reside from now on...

So - permissions, cache, what am I looking for? System is brand new and almost vanilla so there should be zero cruft messing up things.
 
So - permissions, cache, what am I looking for?

I guess something isn't fully compatible between Tahoe and exFat. That's just my speculation. To test this theory you can try another external drive formatted differently and see if the problem persists. I assume you need exFat for cross-platform compatibility anyway though.
 
  • Like
Reactions: th0masp
I guess something isn't fully compatible between Tahoe and exFat. That's just my speculation. To test this theory you can try another external drive formatted differently and see if the problem persists. I assume you need exFat for cross-platform compatibility anyway though.
Exactly right on all counts. Yeah it works with external APFS and HFS drives - and indeed neither of those are an option.

Argh, better not be a bug that gets fixed in like a year. I love beta testing!
 
  • Like
Reactions: zevrix
2 thoughts - first: .DS_Store files might be the culprit here. Open a terminal and execute
defaults write com.apple.desktopservices DSDontWriteUSBStores -bool false
to stop writing these files to the external drives. Execute
find /Volumes/NameOfYourExternalExFatDrive -name ".DS_Store" -delete
to delete the existing ones. Unmount, disconnect, reconnect.

Secondly the icon resource dimensions working in older macOS versions might not match Tahoe -> see e.g. this online icon generator for the dimension range. Try pasting the linked image of e.g. any icon shown here for testing purpose to one of your scripts and check. Tahoe "wants/needs" the linked max resolution, what you describe happens when that is not available.

Nota bene: I use custom icons on macOS 26 on ExFAT T5 and T7 without encountering the described behaviour (.DS_Store - and for some Spotlight indexing - disabled.
 
  • Like
Reactions: th0masp
What if you made a disk-image on the EXFAT drive in HFS+ or APFS format, and stored the shell scripts there. As long as no non-Macs need access to the shell scripts, that might avoid the problem. Yes, it takes an extra action to mount the disk-image.

A file's custom icons are probably stored in the resource fork, or possibly an xattr. All of those are stored in the "._" file associated with the main file. The 'xattr' cmd on the Mac can list all the xattr of a file, including its resource fork.
 
  • Like
Reactions: th0masp
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.