diff options
Diffstat (limited to 'src/merge.c')
-rw-r--r-- | src/merge.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/merge.c b/src/merge.c index 581e8b9..7cca266 100644 --- a/src/merge.c +++ b/src/merge.c @@ -161,11 +161,13 @@ static int do_copy(const char *a, const char *b) { if (errno != EEXIST) return r; - if (!(q = question("Replace existing file?", "ny"))) + if (!(q = question("Replace existing file?", "ny"))) { + errno = EINVAL; return -1; + } - if (q != 'y') - return -1; + if (q != 'y') /* Treat as success */ + return 0; } return copy_proc(a, b, 1); |