Suddenly, several people started linking to Jonathan “Wolf” Rentzsch‘ new weblog. At least new to me… welcome to the weblog world! I’ve met Jon at previous MacHack conferences, he’s very friendly and an up-and-coming WebObjects expert… and we’re about tied in number of published MacHack papers . This year he may get ahead of me, as I’ll probably won’t be able neither to write a paper nor to go to the conference.
Anyway, the first important article I saw on his site was the interview with Peter Sichel of Sustainable Softworks. Required reading for any software author. Coincidentally, “Sichel” means “crescent” in German, and “Rentzsch” is pronounced “wrench”… hence the title of this post. Haha. OK, I promise not to do that again soon.
Now it gets interesting. Jon wrote about a serious difference between the Mac OS 9 and Mac OS X Finders:
Finder X, unlike Finder 9, allows the user to overwrite a folder with a file and vice-versa. You can reproduce this:
* Create a new folder named “test”
* Elsewhere, create a file named “test”
* Drag file “test” over into folder “test”‘s container.
* Finder X will warn “A newer item named “test” already exists in this location. Do you want to replace it with the older one you are moving?” with [Stop] [Replace] buttons.
Finder 9 correctly would not allow the action at all. That is, it would put up a “stop” alert with one unconditional button: [OK].
He also filed a bug with Apple.
Subsequently, several people posted their opinions. Bill Bumgarner disagrees that this is a bug. So does Erik Barzeski. Olof Hellman agrees with Jon. John Gruber gives a great summary of the problem, and agrees somewhat with both sides, suggesting that the overwritten folder be moved to the Trash instead of being deleted outright. While I was pondering my own position, Michael Tsai agreed with Bill.
Everybody now agrees that the real bug is that, after the folder is overwritten, the Finder’s “Undo” command moves the overwriting file back to its old location but fails to restore to overwritten folder. Michael also writes:
I’m not an expert on this stuff, but it appears that the Finder could exchange the file references so that aliases point to the new item, not the one in the trash…
All this said, I’m not sure I’d like the Undo command to bring the original item out of the trash, because I doubt the Finder can guarantee that the restored item will be identical to the original.
No, that wouldn’t be a problem; indeed, if you move a folder to the Trash and then “Undo”, the folder is moved back with no untoward side-effects, since this also is done by swapping file-references. Also, no extra disk space is needed for this, as long as both items were on the same volume.
I find myself agreeing with Bill and Michael. Overwriting an item with another should move the first one to the Trash, in such a way to make this fully undoable. If the new item is copied from another volume, and space is so crowded as to make it necessary to remove the first item before copying, the Finder should put up a very carefully worded alert explaining this.