Asking if I want -r removed has nothing to do with anything.
you say "You cannot delete the directory you are immediately in, so that at the very least is prevented."
I have no idea what the rest of your comment is in relation to what I said other than I'm pretty sure you can accidentally delete a directory your in given what Steam did.
Deleting you current directory is against the POSIX standard. It should not be allowed.
If however you delete a directory that is higher up the directory tree (e.g. the parent directory), it will be deleted.
As far as I can tell this does not violate the POSIX standard[1], as that situation is left as undefined (since in theory the directory you are deleting will chain to the directory you are currently in which is open in the tty).
Edit: The rest of my previous comment was trying to say that the utility of being able to self destruct the current directory is arguable. Why should it be prevented (especially when it could just be hidden behind a flag to prevent accidental destruction)?
Edit2: D'oh. Forgot the reference:
[1] http://pubs.opengroup.org/onlinepubs/9699919799/functions/rm...
Ok, I read that wrong a long while back, but "allowed error" is really odd. I guess I still side on an error is an error and it should not be allowed.
rm -rf "$STEAMROOT/"*
When $STEAMROOT was empty, "steam apparently deleted everything owned by my user recursively from the root directory. Including my 3tb external drive I back everything up to that was mounted under /media."
http://web.archive.org/web/20061021192240/http://blogs.sun.c...
GNU coreutils changed the default to --preserve-root some years later, in version 6.2:
http://git.savannah.gnu.org/cgit/coreutils.git/tree/ChangeLo...