summaryrefslogtreecommitdiff
path: root/scp.c
diff options
context:
space:
mode:
Diffstat (limited to 'scp.c')
-rw-r--r--scp.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/scp.c b/scp.c
index 8febe12a1..b35a7dd6c 100644
--- a/scp.c
+++ b/scp.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: scp.c,v 1.161 2007/10/24 03:44:02 djm Exp $ */ 1/* $OpenBSD: scp.c,v 1.162 2008/01/01 09:06:39 dtucker Exp $ */
2/* 2/*
3 * scp - secure remote copy. This is basically patched BSD rcp which 3 * scp - secure remote copy. This is basically patched BSD rcp which
4 * uses ssh to do the data transfer (instead of using rcmd). 4 * uses ssh to do the data transfer (instead of using rcmd).
@@ -669,8 +669,14 @@ syserr: run_err("%s: %s", name, strerror(errno));
669 * versions expecting microseconds. 669 * versions expecting microseconds.
670 */ 670 */
671 (void) snprintf(buf, sizeof buf, "T%lu 0 %lu 0\n", 671 (void) snprintf(buf, sizeof buf, "T%lu 0 %lu 0\n",
672 (u_long) stb.st_mtime, 672 (u_long) (stb.st_mtime < 0 ? 0 : stb.st_mtime),
673 (u_long) stb.st_atime); 673 (u_long) (stb.st_atime < 0 ? 0 : stb.st_atime));
674 if (verbose_mode) {
675 fprintf(stderr, "File mtime %ld atime %ld\n",
676 (long)stb.st_mtime, (long)stb.st_atime);
677 fprintf(stderr, "Sending file timestamps: %s",
678 buf);
679 }
674 (void) atomicio(vwrite, remout, buf, strlen(buf)); 680 (void) atomicio(vwrite, remout, buf, strlen(buf));
675 if (response() < 0) 681 if (response() < 0)
676 goto next; 682 goto next;