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
This commit is contained in:
David E. O'Brien 2013-01-23 02:06:20 +00:00
parent 5771a68296
commit e4573a9a7b

View File

@ -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);