Subject: Re: bug#21084: rm appears to no longer be POSIX compliant (as of 2013 edition) re: deleting empty dirs and files under <path>/.

From: Linda Walsh <[email-masked]>
Date: Sat, 18 Jul 2015 15:11:03 -0700

reopen 21084
thanks

Andreas Schwab wrote:
> Linda Walsh <[email-masked]> writes:
> 
>> In looking at the 2013 specification for rm
>> (http://pubs.opengroup.org/onlinepubs/9699919799/utilities/rm.html),
>>
>> it no longer says to stop processing if the path basename equals
>> "." or "..". 
> 
> "If either of the files dot or dot-dot are specified as the basename
> portion of an operand (that is, the final pathname component) or if an
> operand resolves to the root directory, rm shall write a diagnostic
> message to standard error and do nothing more with such operands."
----
	I'll grant it also says you can't remove "/",

	So a special flag "--use_depth_first_inspection" that says not to look at
a "basename" until it's children have been processed wouldn't be any more 
out of place than special flags to handle "/" processing, right?

	The fact that they put the ".", ".." and "/" together, outside of
the 1-4 processing leads one to the idea that they should be treated similarly,
no?