mirror of
git://git.suckless.org/sbase
synced 2026-01-26 13:43:17 +00:00
cp: Don't modify status for -i
Quoting POSIX:
The following exit values shall be returned: 0 All requested files (excluding files where a non-affirmative response was given to a request for confirmation) were successfully copied. >0 An error occurred.
This commit is contained in:
parent
9e8b431075
commit
11492947de
@ -44,10 +44,8 @@ cp(const char *s1, const char *s2, int depth)
|
||||
}
|
||||
|
||||
if (cp_iflag && access(s2, F_OK) == 0) {
|
||||
if (!confirm("overwrite '%s'? ", s2)) {
|
||||
cp_status = 1;
|
||||
if (!confirm("overwrite '%s'? ", s2))
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (cp_vflag)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user