summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Youngman <jay@gnu.org>2005-01-16 23:36:30 +0000
committerJames Youngman <jay@gnu.org>2005-01-16 23:36:30 +0000
commita8af6409fa2b3c7f630b7c3a2b047d0bf6c65552 (patch)
tree23fb6e2268d655d103bd31ab977f1184e15aa437
parent5ba8ad4ab900c5bbf88866bf5bed72f75f07b44a (diff)
downloadfindutils-a8af6409fa2b3c7f630b7c3a2b047d0bf6c65552.tar.gz
When completing incomplete multiple execs, use 'eval_tree' not 'predicates'
-rw-r--r--find/find.c11
-rw-r--r--find/pred.c1
2 files changed, 7 insertions, 5 deletions
diff --git a/find/find.c b/find/find.c
index 25a01d02..294e636d 100644
--- a/find/find.c
+++ b/find/find.c
@@ -503,7 +503,7 @@ main (int argc, char **argv)
* partially-full command lines which have been built,
* but which are not yet complete. Execute those now.
*/
- complete_pending_execs(predicates);
+ complete_pending_execs(eval_tree);
return state.exit_status;
}
@@ -1349,11 +1349,12 @@ process_dir (char *pathname, char *name, int pathlen, struct stat *statp, char *
}
- /* We're about to leave the directory. If there are any -execdir argument lists
- * which have been built but have not yet been processed, do them now
- * because they must be done in the same directory.
+ /* We're about to leave the directory. If there are any
+ * -execdir argument lists which have been built but have not
+ * yet been processed, do them now because they must be done in
+ * the same directory.
*/
- complete_pending_execdirs(predicates);
+ complete_pending_execdirs(eval_tree);
#if USE_SAFE_CHDIR
if (strcmp (name, "."))
diff --git a/find/pred.c b/find/pred.c
index 92a34525..7e33830b 100644
--- a/find/pred.c
+++ b/find/pred.c
@@ -485,6 +485,7 @@ new_impl_pred_exec (const char *pathname, struct stat *stat_buf,
else
{
int i;
+
for (i=0; i<execp->num_args; ++i)
{
bc_do_insert(&execp->ctl,