1 find: fix regression in status processing for path arguments
3 Regression added in commit 14158b4127dba30466c50147b868a6a89702960b
4 "find: add optional support for '-exec ... {} +'"
6 This commit causes find to exit on the first path argument that was not
7 found, which breaks existing scripts and is incompatible to other
10 Instead of exiting on the first failure, return EXIT_FAILURE at the end
11 if any error occurred.
13 Signed-off-by: Felix Fietkau <nbd@openwrt.org>
15 --- a/findutils/find.c
16 +++ b/findutils/find.c
17 @@ -1460,12 +1460,10 @@ int find_main(int argc UNUSED_PARAM, cha
21 - status = EXIT_FAILURE;
23 + status |= EXIT_FAILURE;
27 - IF_FEATURE_FIND_EXEC_PLUS(status = flush_exec_plus();)
29 + IF_FEATURE_FIND_EXEC_PLUS(status |= flush_exec_plus();)