aboutsummaryrefslogtreecommitdiff
path: root/libbb/remove_file.c
diff options
context:
space:
mode:
authorbug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277>2003-05-26 14:07:50 +0000
committerbug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277>2003-05-26 14:07:50 +0000
commit76f4ab68a56e14747c25e6da830cf73b38bbe1cd (patch)
treed2e94dac0f1f5da5cb3ecb927b78c4c2a02f4ea6 /libbb/remove_file.c
parent37e0338781ea28f57bed354fe745effb020d16fc (diff)
downloadbusybox-w32-76f4ab68a56e14747c25e6da830cf73b38bbe1cd.tar.gz
busybox-w32-76f4ab68a56e14747c25e6da830cf73b38bbe1cd.tar.bz2
busybox-w32-76f4ab68a56e14747c25e6da830cf73b38bbe1cd.zip
Vodz, last_patch_86
git-svn-id: svn://busybox.net/trunk/busybox@6853 69ca8d6d-28ef-0310-b511-8ec308f3f277
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 65708a252..8b45c58b8 100644
--- a/libbb/remove_file.c
+++ b/libbb/remove_file.c
@@ -79,11 +79,9 @@ extern int remove_file(const char *path, int flags)
79 while ((d = readdir(dp)) != NULL) { 79 while ((d = readdir(dp)) != NULL) {
80 char *new_path; 80 char *new_path;
81 81
82 if (strcmp(d->d_name, ".") == 0 || 82 new_path = concat_subpath_file(path, d->d_name);
83 strcmp(d->d_name, "..") == 0) 83 if(new_path == NULL)
84 continue; 84 continue;
85
86 new_path = concat_path_file(path, d->d_name);
87 if (remove_file(new_path, flags) < 0) 85 if (remove_file(new_path, flags) < 0)
88 status = -1; 86 status = -1;
89 free(new_path); 87 free(new_path);