From: Jim Meyering Date: Mon, 6 Oct 1997 05:23:49 +0000 (+0000) Subject: fix braino X-Git-Tag: TEXTUTILS-1_22c~301 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=48f0a083329b989bda90aeda763a4222155a6a06;p=thirdparty%2Fcoreutils.git fix braino --- diff --git a/src/copy.c b/src/copy.c index 93f4aaa050..c76fbcda41 100644 --- a/src/copy.c +++ b/src/copy.c @@ -709,13 +709,15 @@ copy_internal (const char *src_path, const char *dst_path, if (utime (dst_path, &utb)) { error (0, errno, _("preserving times for %s"), dst_path); - return x->require_preserve; + if (x->require_preserve) + return 1; } if (DO_CHOWN (chown, dst_path, src_sb.st_uid, src_sb.st_gid)) { error (0, errno, _("preserving ownership for %s"), dst_path); - return x->require_preserve; + if (x->require_preserve) + return 1; } } @@ -725,7 +727,8 @@ copy_internal (const char *src_path, const char *dst_path, if (chmod (dst_path, src_mode & x->umask_kill)) { error (0, errno, _("preserving permissions for %s"), dst_path); - return x->require_preserve; + if (x->require_preserve) + return 1; } } else if (fix_mode) @@ -757,8 +760,6 @@ valid_options (const struct cp_options *co) /* FIXME: make sure xstat and dereference are consistent. */ assert (co->xstat); - assert (co->require_preserve == 0 || co->require_preserve == 1); - assert (co->sparse_mode != SPARSE_UNUSED); return 1; }