mv: fix issues with previous prompt adjustments

* src/copy.c (overwrite_ok): Fix the gettext calls so
that the second string is tagged for translation.
Display the correct "replace ..." prompt when in move_mode.
* tests/mv/i-3.sh: Display the output on failure to ease debugging.
This commit is contained in:
Pádraig Brady authored and Paul Eggert committed 2014-03-26 08:23:23 -07:00
1 parent 5de5d8a5c0
commit 2d8ae88a22
2 files changed
+5 -5

No files matched your search

+4 -4
View File
@@ -1575,10 +1575,10 @@ overwrite_ok (struct cp_options const *x, char const *dst_name,
strmode (dst_sb->st_mode, perms);
perms[10] = '\0';
fprintf (stderr,
_((x->unlink_dest_before_opening
|| x->unlink_dest_after_failed_open)
? "%s: replace %s, overriding mode %04lo (%s)? "
: "%s: unwritable %s (mode %04lo, %s); try anyway? "),
(x->move_mode || x->unlink_dest_before_opening
|| x->unlink_dest_after_failed_open)
? _("%s: replace %s, overriding mode %04lo (%s)? ")
: _("%s: unwritable %s (mode %04lo, %s); try anyway? "),
program_name, quote (dst_name),
(unsigned long int) (dst_sb->st_mode & CHMOD_MODE_BITS),
&perms[1]);
+1 -1
View File
@@ -52,7 +52,7 @@ check_overwrite_prompt()
}
# Wait for up to 12.7 seconds for the expected prompt.
retry_delay_ check_overwrite_prompt .1 7 || fail=1
retry_delay_ check_overwrite_prompt .1 7 || { fail=1; cat out; }
kill $pid