]> granicus.if.org Git - shadow/commitdiff
Stop at the first error.
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Fri, 28 Dec 2007 00:08:16 +0000 (00:08 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Fri, 28 Dec 2007 00:08:16 +0000 (00:08 +0000)
libmisc/copydir.c

index 1a93a93f4fd4b11e8d9e0c3e831f55ae97aa3f6e..16c80e29c7234219a1958c4fbae709a9af4db8a7 100644 (file)
@@ -217,7 +217,7 @@ int copy_tree (const char *src_root, const char *dst_root, uid_t uid, gid_t gid)
                dst_orig = dst_root;
                set_orig++;
        }
-       while ((ent = readdir (dir))) {
+       while ((0 == err) && (ent = readdir (dir)) != NULL) {
 
                /*
                 * Skip the "." and ".." entries