diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2006-05-24 22:15:03 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:08:35 -0500 |
commit | ae67b20623b1887b2afa061f328b5d52654ba6c7 (patch) | |
tree | 8dfcbb9f20edea94fa4b988253a8d99db819035f /source4/client | |
parent | e157dccfaf699bc6fe436a8cdf1c95b125cde2db (diff) | |
download | samba-ae67b20623b1887b2afa061f328b5d52654ba6c7.tar.gz samba-ae67b20623b1887b2afa061f328b5d52654ba6c7.tar.bz2 samba-ae67b20623b1887b2afa061f328b5d52654ba6c7.zip |
r15875: Fix bug in smbclients 'put' command tridge found a while ago. Add tests
for 'put' and 'get' commands so we don't break them again.
Fixes #3742
(This used to be commit 141600a624ca90374c2f306139015f8c7487cc0f)
Diffstat (limited to 'source4/client')
-rw-r--r-- | source4/client/client.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source4/client/client.c b/source4/client/client.c index 20542c0183..b532cd9910 100644 --- a/source4/client/client.c +++ b/source4/client/client.c @@ -1194,16 +1194,16 @@ static int cmd_put(struct smbclient_context *ctx, const char **args) char *rname; if (!args[1]) { - d_printf("put <filename>\n"); + d_printf("put <filename> [<remotename>]\n"); return 1; } - lname = talloc_asprintf(ctx, "%s\\%s", ctx->remote_cur_dir, args[1]); + lname = talloc_strdup(ctx, args[1]); if (args[2]) rname = talloc_strdup(ctx, args[2]); else - rname = talloc_strdup(ctx, lname); + rname = talloc_asprintf(ctx, "%s\\%s", ctx->remote_cur_dir, lname); dos_clean_name(rname); |