From: Sam Liddicott Date: Fri, 21 Aug 2009 14:54:49 +0000 (+0200) Subject: s4:client X-Git-Tag: tevent-0.9.8~272 X-Git-Url: http://git.samba.org/samba.git/?p=ira%2Fwip.git;a=commitdiff_plain;h=9d824dc115c7096ea555b135d58091e8620495d9 s4:client Put was assuming that the remote name was always absolute, and not relative to the current remote directory. Signed-off-by: Sam Liddicott --- diff --git a/source4/client/client.c b/source4/client/client.c index 82aeef32900..3fa819c8e7f 100644 --- a/source4/client/client.c +++ b/source4/client/client.c @@ -1221,10 +1221,14 @@ static int cmd_put(struct smbclient_context *ctx, const char **args) lname = talloc_strdup(ctx, args[1]); - if (args[2]) - rname = talloc_strdup(ctx, args[2]); - else + if (args[2]) { + if (args[2][0]=='\\') + rname = talloc_strdup(ctx, args[2]); + else + rname = talloc_asprintf(ctx, "%s\\%s", ctx->remote_cur_dir, args[2]); + } else { rname = talloc_asprintf(ctx, "%s\\%s", ctx->remote_cur_dir, lname); + } dos_clean_name(rname);