[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#10802: rmdir -p behaviour

From: Paul Eggert
Subject: bug#10802: rmdir -p behaviour
Date: Tue, 14 Feb 2012 07:59:45 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20120131 Thunderbird/10.0

On 02/14/2012 07:53 AM, Jim Meyering wrote:
> we'd have to defer removing a/ until the last argument,
> and to know that we need to handle this unusual case, we'd have to
> inspect each of the intervening arguments.

There's a better way.  Put all the "I can't remove a
parent directory" diagnostics into a data structure rather than
issuing them immediately.  Then, at the end of the "rm", check
whether the directories still exist.  Output the diagnostics
only for directories that still exist.

This still requires RAM, but only for the unusual case where
the rmdirs fail.

Still not sure it's worth it, though....

reply via email to

[Prev in Thread] Current Thread [Next in Thread]