libbb/recursive_action.c: fix slight error in prev commit
authorDenis Vlasenko <vda.linux@googlemail.com>
Fri, 4 Jul 2008 10:29:30 +0000 (10:29 -0000)
committerDenis Vlasenko <vda.linux@googlemail.com>
Fri, 4 Jul 2008 10:29:30 +0000 (10:29 -0000)
libbb/recursive_action.c

index 66bf6aa6286eda56029666a0141ef09c8abf50ba..dbc31c3b6fff6d6b86501248d5a5cd279684f495 100644 (file)
@@ -111,15 +111,17 @@ 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) */
-               /*s =*/ recursive_action(nextFile, flags, fileAction, dirAction,
-                                               userData, depth + 1);
+               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) {