From 671691cf2107b846b40c165e6d5b2806172b6030 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Fri, 4 Jul 2008 10:25:44 +0000 Subject: modutils: optional modutils-small by Vladimir Dronnikov. 15kb smaller than standard one. libbb/recursive_action.c: commented-out code for aborting the scan. --- libbb/recursive_action.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'libbb') diff --git a/libbb/recursive_action.c b/libbb/recursive_action.c index 9b6951f..66bf6aa 100644 --- a/libbb/recursive_action.c +++ b/libbb/recursive_action.c @@ -111,16 +111,23 @@ int FAST_FUNC recursive_action(const char *fileName, } status = TRUE; while ((next = readdir(dir)) != NULL) { + /*int s;*/ char *nextFile; nextFile = concat_subpath_file(fileName, next->d_name); if (nextFile == NULL) continue; /* process every file (NB: ACTION_RECURSE is set in flags) */ - if (!recursive_action(nextFile, flags, fileAction, dirAction, - userData, depth + 1)) - status = FALSE; + /*s =*/ recursive_action(nextFile, flags, fileAction, dirAction, + userData, depth + 1); free(nextFile); +//#define RECURSE_RESULT_ABORT 3 +// if (s == RECURSE_RESULT_ABORT) { +// closedir(dir); +// return s; +// } +// if (s == FALSE) +// status = FALSE; } closedir(dir); -- cgit v1.1