summaryrefslogtreecommitdiff
path: root/sftp-client.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2004-03-08 23:12:02 +1100
committerDamien Miller <djm@mindrot.org>2004-03-08 23:12:02 +1100
commit9ba3069a8b346efc7c1b1ea5908e6c5c8b01fec2 (patch)
tree2aacf14a0787ac0f2dab42fcff2684eaa08fab9a /sftp-client.c
parent57aae982bec2e5e8e9db487626c24f7c35aedfb2 (diff)
- djm@cvs.openbsd.org 2004/03/03 09:30:42
[sftp-client.c] Don't print duplicate messages when progressmeter is off Spotted by job317 AT mailvault.com; ok markus@
Diffstat (limited to 'sftp-client.c')
-rw-r--r--sftp-client.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/sftp-client.c b/sftp-client.c
index 81c5dd497..781d9827a 100644
--- a/sftp-client.c
+++ b/sftp-client.c
@@ -20,7 +20,7 @@
20/* XXX: copy between two remote sites */ 20/* XXX: copy between two remote sites */
21 21
22#include "includes.h" 22#include "includes.h"
23RCSID("$OpenBSD: sftp-client.c,v 1.46 2004/02/17 05:39:51 djm Exp $"); 23RCSID("$OpenBSD: sftp-client.c,v 1.47 2004/03/03 09:30:42 djm Exp $");
24 24
25#include "openbsd-compat/sys-queue.h" 25#include "openbsd-compat/sys-queue.h"
26 26
@@ -805,13 +805,8 @@ do_download(struct sftp_conn *conn, char *remote_path, char *local_path,
805 max_req = 1; 805 max_req = 1;
806 progress_counter = 0; 806 progress_counter = 0;
807 807
808 if (showprogress) { 808 if (showprogress && size != 0)
809 if (size) 809 start_progress_meter(remote_path, size, &progress_counter);
810 start_progress_meter(remote_path, size,
811 &progress_counter);
812 else
813 printf("Fetching %s to %s\n", remote_path, local_path);
814 }
815 810
816 while (num_req > 0 || max_req > 0) { 811 while (num_req > 0 || max_req > 0) {
817 char *data; 812 char *data;
@@ -1036,8 +1031,6 @@ do_upload(struct sftp_conn *conn, char *local_path, char *remote_path,
1036 offset = 0; 1031 offset = 0;
1037 if (showprogress) 1032 if (showprogress)
1038 start_progress_meter(local_path, sb.st_size, &offset); 1033 start_progress_meter(local_path, sb.st_size, &offset);
1039 else
1040 printf("Uploading %s to %s\n", local_path, remote_path);
1041 1034
1042 for (;;) { 1035 for (;;) {
1043 int len; 1036 int len;