From e4573a9a7bcb276586bd6a947f9f5f6161da153a Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Wed, 23 Jan 2013 02:06:20 +0000 Subject: [PATCH] Return "failure" as we do for 'cp -i' and a "n" answer. Otherwise with '-v' we print out the file name as if it was copied: /tmp/2gb-card/M0132.CTG not overwritten /mnt/DCIM/CANONMSC/M0132.CTG -> /tmp/2gb-card/M0132.CTG --- bin/cp/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/cp/utils.c b/bin/cp/utils.c index d729bd5b340f..aa424f846286 100644 --- a/bin/cp/utils.c +++ b/bin/cp/utils.c @@ -104,7 +104,7 @@ copy_file(const FTSENT *entp, int dne) if (vflag) printf("%s not overwritten\n", to.p_path); (void)close(from_fd); - return (0); + return (1); } else if (iflag) { (void)fprintf(stderr, "overwrite %s? %s", to.p_path, YESNO);