diff options
Diffstat (limited to 'source4/client/client.c')
-rw-r--r-- | source4/client/client.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/source4/client/client.c b/source4/client/client.c index 82aeef3290..3fa819c8e7 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); |