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, | |||
103 | while ((next = readdir(dir)) != NULL) { | 103 | while ((next = readdir(dir)) != NULL) { |
104 | char *nextFile; | 104 | char *nextFile; |
105 | 105 | ||
106 | if ((strcmp(next->d_name, "..") == 0) | 106 | nextFile = concat_subpath_file(fileName, next->d_name); |
107 | || (strcmp(next->d_name, ".") == 0)) { | 107 | if(nextFile == NULL) |
108 | continue; | 108 | continue; |
109 | } | ||
110 | nextFile = concat_path_file(fileName, next->d_name); | ||
111 | if (! recursive_action(nextFile, TRUE, followLinks, depthFirst, | 109 | if (! recursive_action(nextFile, TRUE, followLinks, depthFirst, |
112 | fileAction, dirAction, userData)) { | 110 | fileAction, dirAction, userData)) { |
113 | status = FALSE; | 111 | status = FALSE; |