diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2004-03-03 09:31:21 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2004-03-03 09:31:21 +0000 |
commit | d0520293a38c42ed05c94add8efddeca982a9653 (patch) | |
tree | e397ef67ae0c2e1221a6aaea761cff5fad45adba /usr.bin | |
parent | abfc1b4e783d9169d68323ee3a224eec7cc84c8e (diff) |
Fix initialisation of progress meter; ok markus@
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/ssh/sftp.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.bin/ssh/sftp.c b/usr.bin/ssh/sftp.c index c4c0697504d..a2cf19314b1 100644 --- a/usr.bin/ssh/sftp.c +++ b/usr.bin/ssh/sftp.c @@ -16,7 +16,7 @@ #include "includes.h" -RCSID("$OpenBSD: sftp.c,v 1.44 2004/02/17 11:03:08 djm Exp $"); +RCSID("$OpenBSD: sftp.c,v 1.45 2004/03/03 09:31:20 djm Exp $"); #include <glob.h> @@ -46,7 +46,7 @@ size_t num_requests = 16; static pid_t sshpid = -1; /* This is set to 0 if the progressmeter is not desired. */ -int showprogress; +int showprogress = 1; int remote_glob(struct sftp_conn *, const char *, int, int (*)(const char *, int), glob_t *); /* proto for sftp-glob.c */ @@ -1347,6 +1347,9 @@ main(int argc, char **argv) } } + if (!isatty(STDERR_FILENO)) + showprogress = 0; + log_init(argv[0], ll, SYSLOG_FACILITY_USER, 1); if (sftp_direct == NULL) { |