GNU bug report logs -
#44865
date recalculation error
Previous Next
Reported by: Ruder Laplace <ruder.email <at> gmail.com>
Date: Wed, 25 Nov 2020 13:10:02 UTC
Severity: normal
Tags: notabug, patch
Done: Pádraig Brady <P <at> draigBrady.com>
Bug is archived. No further changes may be made.
Full log
Message #10 received at control <at> debbugs.gnu.org (full text, mbox):
forcemerge 44889 44865 44883
stop
On 26/11/2020 14:35, Nick Alcock wrote:
> diff --git a/src/remove.c b/src/remove.c
> index 2d40c55cd..1150cf179 100644
> --- a/src/remove.c
> +++ b/src/remove.c
> @@ -508,8 +508,7 @@ rm_fts (FTS *fts, FTSENT *ent, struct rm_options const *x)
> s = excise (fts, ent, x, true);
> fts_skip_tree (fts, ent);
> }
> -
> - if (s != RM_OK)
> + else if (s != RM_OK)
> {
> mark_ancestor_dirs (ent);
> fts_skip_tree (fts, ent);
I think we'd still like to mark ancestors when failing to remove,
so that we don't prompt unnecessarily.
I think it would be better to do:
diff --git a/src/remove.c b/src/remove.c
index 2d40c55cd..adf948935 100644
--- a/src/remove.c
+++ b/src/remove.c
@@ -506,7 +506,8 @@ rm_fts (FTS *fts, FTSENT *ent, struct rm_options const *x)
/* When we know (from prompt when in interactive mode)
that this is an empty directory, don't prompt twice. */
s = excise (fts, ent, x, true);
- fts_skip_tree (fts, ent);
+ if (s == RM_OK)
+ fts_skip_tree (fts, ent);
}
I've also adjusted the test slightly to not check for `tail`,
and another few cleanups.
I'll push in your name if you're ok with the above changes.
thanks,
Pádraig
This bug report was last modified 4 years and 177 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.