I'm sorry pal, but Ubuntu will let you replace a folder with a file if the file does not reside inside that same folder. So the user's choice is respected. The only situation when you are not given the possibility to do this is the one described by the OP and shown by my previous post.
I don't think Apple is getting it right. The warning given by finder does not say that both files will be deleted.
Getting it right is doing what the user wants or not doing anything at all.
Intelligent people should know this...
Before anyone complains that it doesn't matter how everything else on earth does it
Finder in Snow Leopard responds the same way. How about that "red herring?"