summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorEitan Adler <eadler@FreeBSD.org>2012-11-26 05:13:57 +0000
committerEitan Adler <eadler@FreeBSD.org>2012-11-26 05:13:57 +0000
commita7162deb81fc9b52463ee9a27623d59efac5c694 (patch)
tree50e7fe2d38aa7bccb231991f42df1b37e1009943 /bin
parentb4fb058bbd0b59e1aa6226afc64416a78337bb7f (diff)
Notes
Diffstat (limited to 'bin')
-rw-r--r--bin/mv/mv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/mv/mv.c b/bin/mv/mv.c
index 3fc4f8e3bd49..8d5fb75e6429 100644
--- a/bin/mv/mv.c
+++ b/bin/mv/mv.c
@@ -199,7 +199,7 @@ do_move(const char *from, const char *to)
} 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] == ' ' ? "" : " ",