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

Previous Next

Package: coreutils;

Reported by: Linda Walsh <coreutils <at> tlinx.org>

Date: Mon, 3 Sep 2012 00:34:02 UTC

Severity: normal

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Jim Meyering <jim <at> meyering.net>
Cc: Linda Walsh <coreutils <at> tlinx.org>, "12339 <at> debbugs.gnu.org" <12339 <at> debbugs.gnu.org>
Subject: bug#12339: Bug: rm -fr . doesn't dir depth first deletion yet it is	documented to do so.
Date: Wed, 05 Sep 2012 08:11:01 -0700
On 09/05/2012 07:56 AM, Jim Meyering wrote:
> +  /* When failing to rmdir an unreadable directory, the typical errno value
> +     is EISDIR or ENOTDIR, but that would be meaningless in a diagnostic.
> +     When that happens and the errno value from the failed open is EPERM
> +     or EACCES, use the earlier, more descriptive errno value.  */
> +  if (ent->fts_info == FTS_DNR
> +      && (errno == ENOTEMPTY || errno == EISDIR || errno == ENOTDIR)
> +      && (ent->fts_errno == EPERM || ent->fts_errno == EACCES))

Thanks for doing all that.  I did notice that the code mentions
ENOTEMPTY but the comment doesn't -- is that intentional?




This bug report was last modified 6 years and 187 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.