From 8ed3d93c208f2ae5caa31c61bac901c6d33e6737 Mon Sep 17 00:00:00 2001 From: jay Date: Mon, 17 Jan 2005 20:50:38 +0000 Subject: [PATCH] "-exec ... {} +" always returns "true". --- find/pred.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/find/pred.c b/find/pred.c index 7e33830..4b835d1 100644 --- a/find/pred.c +++ b/find/pred.c @@ -480,7 +480,7 @@ new_impl_pred_exec (const char *pathname, struct stat *stat_buf, /* POSIX: If the primary expression is punctuated by a plus * sign, the primary shall always evaluate as true */ - return 0; + return true; } else { @@ -1309,6 +1309,11 @@ pred_quit (char *pathname, struct stat *stat_buf, struct predicate *pred_ptr) (void) stat_buf; (void) pred_ptr; + /* Run any cleanups. This includes executing any command lines + * we have partly built but not executed. + */ + cleanup(); + /* Since -exec and friends don't leave child processes running in the * background, there is no need to wait for them here. */ -- 2.11.4.GIT