Undeletable zombie files on OS X
Somehow, one of Bitbacker's system tests occasionally creates an undeletable file. It happens within a test that generates random filenames, then tries to back up and restore them. Unfortunately, there are apparently some character sequences that make HFS+ choke. I've only had this happen twice ever - once on my 17" MacBook Pro, and just now on my brand new 15" MacBook Pro. Here's what the file looks like:
It can't be deleted from Finder:
It can't be deleted from the console:
And it can't even be "ls"ed:
If I manually move the containing folder to the trash and try to empty it, I get this, which is even more ridiculous than the rest:
I've googled for undeletable files on OS X, as well as for the specific error messages Finder throws, and tried every suggested fix I found. And, of course, I've tried to delete the file from within Python:
>>> os.unlink(os.listdir('.')[0])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: [Errno 2] No such file or directory:
'\\xe4\\xad\\xa9\\xe1\\x84\\x84\\xe1\\x85\\xaf\\[...truncated]'
Dear Apple: please replace HFS+. Seriously, it sucks.