The Samba-Bugzilla – Attachment 3979 Details for
Bug 6161
smbclient corrupts source path in tar mode
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for 3.2.x
look (text/plain), 1.03 KB, created by
Jeremy Allison
on 2009-03-05 19:17:09 UTC
(
hide
)
Description:
Patch for 3.2.x
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2009-03-05 19:17:09 UTC
Size:
1.03 KB
patch
obsolete
>diff --git a/source/client/clitar.c b/source/client/clitar.c >index 084f87e..be0bc32 100644 >--- a/source/client/clitar.c >+++ b/source/client/clitar.c >@@ -1506,6 +1506,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) { >@@ -1524,13 +1525,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); >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 6161
: 3979