Try to make indent formatting less horrible
[oweals/busybox.git] / libbb / copy_file.c
index 81c547479981ce8f97f960af1ac31830770da96a..5808ca48cd16ad339a7d3b6252e74f3a6b9d00a9 100644 (file)
@@ -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;