diff options
Diffstat (limited to 'libbb/recursive_action.c')
-rw-r--r-- | libbb/recursive_action.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libbb/recursive_action.c b/libbb/recursive_action.c index a4a4a7be3..3ea107ca9 100644 --- a/libbb/recursive_action.c +++ b/libbb/recursive_action.c @@ -103,11 +103,9 @@ int recursive_action(const char *fileName, while ((next = readdir(dir)) != NULL) { char *nextFile; - if ((strcmp(next->d_name, "..") == 0) - || (strcmp(next->d_name, ".") == 0)) { + nextFile = concat_subpath_file(fileName, next->d_name); + if(nextFile == NULL) continue; - } - nextFile = concat_path_file(fileName, next->d_name); if (! recursive_action(nextFile, TRUE, followLinks, depthFirst, fileAction, dirAction, userData)) { status = FALSE; |