osxutils
osxutils copied to clipboard
seticon doesn't work for folders
OS X 10.11.4, osxutils version 1.8.2 installed via Homebrew.
seticon
works on files but doesn't have any effect on folders. How to reproduce:
tmpdir=$(mktemp -d)
cd "$tmpdir"
curl -O https://gist.github.com/zmwangx/42b18c5759f30c6e43927eb6bfdc21a2/raw/f6ddc0761e135af9e0326bf21fe18c3af7137004/GoogleChrome-45.0.2454.101.icns
seticon -d GoogleChrome-45.0.2454.101.icns .
/bin/ls -l Icon$'\r'/..namedfork/rsrc
As you can see, seticon
creates a Icon$'\r'
as expected, but the resource fork is empty, so there's no icon for the folder.
It's funny, it was working for me, all the way up through Mojave, but now on Catalina, I'm seeing this exact bug (for the first time). seticon
working fine for files, but for folders it just ends up creating a (visible; shouldn't be) "Icon?" file inside, with size of zero bytes.
Edit: Let me clarify; the non-homebrew version of seticon was working for me up thru Mojave... upon upgrading to Catalina I got an error; I didn't save the exact wording but it was about processor architecture (makes sense; version I was using was prob. 32 bit). Whereupon I installed the latest homebrew version (this one), and am now getting this error with setting custom icons of folders. So hopefully, knowing that the old project's 32 bit code did work setting folders' icons might help someone find where this behavior broke.