[Midnightbsd-cvs] src [8458] trunk/bin/mv/mv.c: follow POSIX standard.
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Sun Sep 18 17:58:17 EDT 2016
Revision: 8458
http://svnweb.midnightbsd.org/src/?rev=8458
Author: laffer1
Date: 2016-09-18 17:58:17 -0400 (Sun, 18 Sep 2016)
Log Message:
-----------
follow POSIX standard.
Modified Paths:
--------------
trunk/bin/mv/mv.c
Modified: trunk/bin/mv/mv.c
===================================================================
--- trunk/bin/mv/mv.c 2016-09-18 21:57:12 UTC (rev 8457)
+++ trunk/bin/mv/mv.c 2016-09-18 21:58:17 UTC (rev 8458)
@@ -200,7 +200,7 @@
} else if (iflg) {
(void)fprintf(stderr, "overwrite %s? %s", to, YESNO);
ask = 1;
- } else if (access(to, W_OK) && !stat(to, &sb)) {
+ } else if (access(to, W_OK) && !stat(to, &sb) && isatty(STDIN_FILENO)) {
strmode(sb.st_mode, modep);
(void)fprintf(stderr, "override %s%s%s/%s for %s? %s",
modep + 1, modep[9] == ' ' ? "" : " ",
More information about the Midnightbsd-cvs
mailing list