diff options
author | Glenn L McGrath <bug1@ihug.co.nz> | 2003-05-26 14:07:50 +0000 |
---|---|---|
committer | Glenn L McGrath <bug1@ihug.co.nz> | 2003-05-26 14:07:50 +0000 |
commit | 393183dccc4d100366972bdbbdc6e03a77839120 (patch) | |
tree | d2e94dac0f1f5da5cb3ecb927b78c4c2a02f4ea6 /libbb/copy_file.c | |
parent | ddfe18df75c15be4a2aadddb241c3b86b1e2968a (diff) | |
download | busybox-w32-393183dccc4d100366972bdbbdc6e03a77839120.tar.gz busybox-w32-393183dccc4d100366972bdbbdc6e03a77839120.tar.bz2 busybox-w32-393183dccc4d100366972bdbbdc6e03a77839120.zip |
Vodz, last_patch_86
Diffstat (limited to 'libbb/copy_file.c')
-rw-r--r-- | libbb/copy_file.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libbb/copy_file.c b/libbb/copy_file.c index 81c547479..5808ca48c 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) | |||
105 | while ((d = readdir(dp)) != NULL) { | 105 | while ((d = readdir(dp)) != NULL) { |
106 | char *new_source, *new_dest; | 106 | char *new_source, *new_dest; |
107 | 107 | ||
108 | if (strcmp(d->d_name, ".") == 0 || | 108 | new_source = concat_subpath_file(source, d->d_name); |
109 | strcmp(d->d_name, "..") == 0) | 109 | if(new_source == NULL) |
110 | continue; | 110 | continue; |
111 | |||
112 | new_source = concat_path_file(source, d->d_name); | ||
113 | new_dest = concat_path_file(dest, d->d_name); | 111 | new_dest = concat_path_file(dest, d->d_name); |
114 | if (copy_file(new_source, new_dest, flags) < 0) | 112 | if (copy_file(new_source, new_dest, flags) < 0) |
115 | status = -1; | 113 | status = -1; |