summaryrefslogtreecommitdiff
path: root/sftp-int.c
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2001-03-24 00:39:12 +0000
committerBen Lindstrom <mouring@eviladmin.org>2001-03-24 00:39:12 +0000
commit7527f8b52dea7485f28e86778ce22e611d1cb277 (patch)
tree42cd9bd5f982f6585f544e21ce471f6dc7090f8e /sftp-int.c
parent9e2057cb348058338113ce11f880ad4cbda25d59 (diff)
- markus@cvs.openbsd.org 2001/03/23 13:10:57
[sftp-int.c] fix put, upload to _absolute_ path, ok djm@
Diffstat (limited to 'sftp-int.c')
-rw-r--r--sftp-int.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/sftp-int.c b/sftp-int.c
index 8e45f869..aa69d802 100644
--- a/sftp-int.c
+++ b/sftp-int.c
@@ -26,7 +26,7 @@
/* XXX: recursive operations */
#include "includes.h"
-RCSID("$OpenBSD: sftp-int.c,v 1.31 2001/03/16 13:44:24 markus Exp $");
+RCSID("$OpenBSD: sftp-int.c,v 1.32 2001/03/23 13:10:57 markus Exp $");
#include "buffer.h"
#include "xmalloc.h"
@@ -451,9 +451,12 @@ process_put(int in, int out, char *src, char *dst, char *pwd, int pflag)
xfree(tmp);
} else
abs_dst = xstrdup(tmp_dst);
- } else if (infer_path(g.gl_pathv[0], &abs_dst)) {
- err = -1;
- goto out;
+ } else {
+ if (infer_path(g.gl_pathv[0], &abs_dst)) {
+ err = -1;
+ goto out;
+ }
+ abs_dst = make_absolute(abs_dst, pwd);
}
printf("Uploading %s to %s\n", g.gl_pathv[0], abs_dst);
err = do_upload(in, out, g.gl_pathv[0], abs_dst, pflag);