Bug 3917 - Remote filename completion does not work.
Summary: Remote filename completion does not work.
Status: NEW
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: smbclient (show other bugs)
Version: 3.0.23
Hardware: x86 Linux
: P3 normal
Target Milestone: none
Assignee: Samba Bugzilla Account
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-09 11:58 UTC by Katsuhiko Takahashi
Modified: 2006-07-09 12:19 UTC (History)
0 users

See Also:


Attachments
Fix remote filename completion (524 bytes, patch)
2006-07-09 12:19 UTC, Katsuhiko Takahashi
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Katsuhiko Takahashi 2006-07-09 11:58:13 UTC
Hi,

In "smbclient", local filename completion works, but
remote filename completion doesn't.
I've fixed it.

 smbclient //foo/bar
 smb: \>get f<TAB>
 foo.c   file.txt  ...  <<-- LOCAL files are listed.


Regards,
    Katsuhiko Takahashi

-------------------------------------
diff -urN source/client.orig/client.c source/client/client.c
--- source/client.orig/client.c 2006-06-23 22:16:53.000000000 +0900
+++ source/client/client.c      2006-07-10 00:59:21.000000000 +0900
@@ -3064,7 +3064,7 @@
                        return NULL;

                for (i = 0; commands[i].name; i++)
-                       if ((strncmp(commands[i].name, text, sp - buf) == 0) && (commands[i].name[sp - buf] == 0))
+                       if ((strncmp(commands[i].name, buf, sp - buf) == 0) && (commands[i].name[sp - buf] == 0))
                                break;
                if (commands[i].name == NULL)
                        return NULL;
Comment 1 Katsuhiko Takahashi 2006-07-09 12:19:03 UTC
Created attachment 2026 [details]
Fix remote filename completion