summaryrefslogtreecommitdiff
path: root/libbb/remove_file.c
diff options
context:
space:
mode:
authorGlenn L McGrath2003-05-26 14:07:50 +0000
committerGlenn L McGrath2003-05-26 14:07:50 +0000
commit393183dccc4d100366972bdbbdc6e03a77839120 (patch)
treed2e94dac0f1f5da5cb3ecb927b78c4c2a02f4ea6 /libbb/remove_file.c
parentddfe18df75c15be4a2aadddb241c3b86b1e2968a (diff)
downloadbusybox-393183dccc4d100366972bdbbdc6e03a77839120.zip
busybox-393183dccc4d100366972bdbbdc6e03a77839120.tar.gz
Vodz, last_patch_86
Diffstat (limited to 'libbb/remove_file.c')
-rw-r--r--libbb/remove_file.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/libbb/remove_file.c b/libbb/remove_file.c
index 65708a2..8b45c58 100644
--- a/libbb/remove_file.c
+++ b/libbb/remove_file.c
@@ -79,11 +79,9 @@ extern int remove_file(const char *path, int flags)
while ((d = readdir(dp)) != NULL) {
char *new_path;
- if (strcmp(d->d_name, ".") == 0 ||
- strcmp(d->d_name, "..") == 0)
+ new_path = concat_subpath_file(path, d->d_name);
+ if(new_path == NULL)
continue;
-
- new_path = concat_path_file(path, d->d_name);
if (remove_file(new_path, flags) < 0)
status = -1;
free(new_path);