summaryrefslogtreecommitdiff
path: root/scp.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2021-08-07 00:08:52 +0000
committerDamien Miller <djm@mindrot.org>2021-08-07 10:20:31 +1000
commitc677e65365d6f460c084e41e0c4807bb8a9cf601 (patch)
tree92eb3e0e87bacf5f1cebb556eb0c6ceae3ff486a /scp.c
parent48cd39b7a4e5e7c25101c6d1179f98fe544835cd (diff)
downloadopenssh-git-c677e65365d6f460c084e41e0c4807bb8a9cf601.tar.gz
upstream: make scp(1) in SFTP mode output better match original
scp(1) by suppressing "Retrieving [path]" lines that were emitted to support the interactive sftp(1) client. ok markus@ OpenBSD-Commit-ID: 06be293df5f156a18f366079be2f33fa68001acc
Diffstat (limited to 'scp.c')
-rw-r--r--scp.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/scp.c b/scp.c
index 9be41a26..51925455 100644
--- a/scp.c
+++ b/scp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: scp.c,v 1.219 2021/08/07 00:06:30 djm Exp $ */
+/* $OpenBSD: scp.c,v 1.220 2021/08/07 00:08:52 djm Exp $ */
/*
* scp - secure remote copy. This is basically patched BSD rcp which
* uses ssh to do the data transfer (instead of using rcmd).
@@ -1289,7 +1289,8 @@ source_sftp(int argc, char *src, char *targ,
debug3_f("copying local %s to remote %s", src, abs_dst);
if (local_is_dir(src) && iamrecursive) {
- if (upload_dir(conn, src, abs_dst, pflag, 1, 0, 0) != 0) {
+ if (upload_dir(conn, src, abs_dst, pflag,
+ SFTP_PROGRESS_ONLY, 0, 0) != 0) {
fatal("failed to upload directory %s to %s",
src, abs_dst);
}
@@ -1521,7 +1522,7 @@ sink_sftp(int argc, char *dst, const char *src, struct sftp_conn *conn)
debug("Fetching %s to %s\n", g.gl_pathv[i], abs_dst);
if (globpath_is_dir(g.gl_pathv[i]) && iamrecursive) {
if (download_dir(conn, g.gl_pathv[i], abs_dst, NULL,
- pflag, 1, 0, 0) == -1)
+ pflag, SFTP_PROGRESS_ONLY, 0, 0) == -1)
err = -1;
} else {
if (do_download(conn, g.gl_pathv[i], abs_dst, NULL,