summaryrefslogtreecommitdiff
path: root/libbb/copy_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/copy_file.c
parentddfe18df75c15be4a2aadddb241c3b86b1e2968a (diff)
downloadbusybox-393183dccc4d100366972bdbbdc6e03a77839120.zip
busybox-393183dccc4d100366972bdbbdc6e03a77839120.tar.gz
Vodz, last_patch_86
Diffstat (limited to 'libbb/copy_file.c')
-rw-r--r--libbb/copy_file.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/libbb/copy_file.c b/libbb/copy_file.c
index 81c5474..5808ca4 100644
--- a/libbb/copy_file.c
+++ b/libbb/copy_file.c
@@ -105,11 +105,9 @@ int copy_file(const char *source, const char *dest, int flags)
while ((d = readdir(dp)) != NULL) {
char *new_source, *new_dest;
- if (strcmp(d->d_name, ".") == 0 ||
- strcmp(d->d_name, "..") == 0)
+ new_source = concat_subpath_file(source, d->d_name);
+ if(new_source == NULL)
continue;
-
- new_source = concat_path_file(source, d->d_name);
new_dest = concat_path_file(dest, d->d_name);
if (copy_file(new_source, new_dest, flags) < 0)
status = -1;