Subject: bug#12339: Bug: rm -fr . doesn't dir depth first deletion yet it is documented to do so.

From: Linda Walsh <[email-masked]>
Date: Sun, 02 Sep 2012 17:32:17 -0700

I'm not sure what the rational for putting in special check to
try to remove the current directory *before*, it's children is,
but it's not correct behavior.

It used to be it just 'ignored' an attempt to delete the current dir
and deleted all the files under it. 

Now there seems to be a special check for "." and disallow it as a
rm target.  But that was a safe and portable way to delete all contents.

can't use '*', -- it is expanded differently depending on shell and 
settings!

I always felt a bit safer if I was able to cd into the dir I wanted, then
rm -fr from the root of that dir by specifying '.'

Could that be added back in as a safe and portable way to do rm *, where I
don't have to worry about whether or not it applies the * will pick up
hidden files.

I would expect it to delete all but the current inode I'm parked on, and
for it -- either issue an error or silently ignore ... preferring 'DoWIMean'
versus 'technically'...as being more user friendly.

Sides -- it normally does depth-first traversal --- since you can't delete
a dir with contents still in it -- so why different for '.'?