bug-findutils
[Top][All Lists]
Advanced

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

Re: [Findutils-patches] [PATCH] -delete requires -depth


From: James Youngman
Subject: Re: [Findutils-patches] [PATCH] -delete requires -depth
Date: Fri, 24 Aug 2007 22:56:30 +0100

On 8/23/07, Eric Blake <address@hidden> wrote:
> Bruno raised the objection on savannah that this approach is not
> backwards-compatible (ie. scripts that used just -delete will now fail to
> do anything).

Well, they will return a nonzero status, which scripts should pay
attention to.   But of course not all scripts do.

> However, I tend to agree with the idea that if we are
> changing the behavior of -delete, an explicit error that explains what is
> missing is important.  Bruno also had the idea of letting -delete operate
> without -depth, by letting -delete swap the traversal of that subtree to
> depth-first while the rest of the traversal is breadth-first prior to
> encountering the -delete action.  I'm not sure that is possible, since my
> understanding of fts() is that the traversal pattern is picked up front.

Yes, fts() has a defined interface.  The interface doesn't provide
very good "I'm leaving this directory" support.  If it did in fact,
this would make -execdir ... {} \+ much more efficient as well.

> In other words, let's think this over a bit more before checking anything in.

Well, I think a warning message would still be appropriate.

James.




reply via email to

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