diff options
author | Andrew Bartlett <abartlet@samba.org> | 2009-03-08 16:16:11 +1100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2009-03-08 16:16:11 +1100 |
commit | 6ac77d19b5a25a53459a58e4828fa9eac0bf11f4 (patch) | |
tree | bb504eecdcb94d6c82b522f5de0fd13de130fb41 /source3/client | |
parent | bb6a2c8076e5e9eabad4ee7f09f6df979616fd13 (diff) | |
parent | 46bcb10b5abb21758cf234764b64220ede1b7ab5 (diff) | |
download | samba-6ac77d19b5a25a53459a58e4828fa9eac0bf11f4.tar.gz samba-6ac77d19b5a25a53459a58e4828fa9eac0bf11f4.tar.bz2 samba-6ac77d19b5a25a53459a58e4828fa9eac0bf11f4.zip |
Merge branch 'master' of ssh://git.samba.org/data/git/samba into wspp-schema
Diffstat (limited to 'source3/client')
-rw-r--r-- | source3/client/clitar.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/source3/client/clitar.c b/source3/client/clitar.c index 18edf037e2..c9f3e87c4d 100644 --- a/source3/client/clitar.c +++ b/source3/client/clitar.c @@ -1513,6 +1513,7 @@ int process_tar(void) if (strrchr_m(cliplist[i], '\\')) { char *p; + char saved_char; char *saved_dir = talloc_strdup(ctx, client_get_cur_dir()); if (!saved_dir) { @@ -1531,13 +1532,28 @@ int process_tar(void) if (!tarmac) { return 1; } + /* + * Strip off the last \\xxx + * xxx element of tarmac to set + * it as current directory. + */ p = strrchr_m(tarmac, '\\'); if (!p) { return 1; } + saved_char = p[1]; p[1] = '\0'; + client_set_cur_dir(tarmac); + /* + * Restore the character we + * just replaced to + * put the pathname + * back as it was. + */ + p[1] = saved_char; + DEBUG(5, ("process_tar, do_list with tarmac: %s\n", tarmac)); do_list(tarmac,attribute,do_tar, False, True); |