The Samba-Bugzilla – Attachment 5087 Details for
Bug 4728
smbclient: Tab completion doesn't know about spaces
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Simple patch, solves part of problem
client_completion.patch (text/plain), 1.05 KB, created by
niekt0
on 2009-12-15 14:45:39 UTC
(
hide
)
Description:
Simple patch, solves part of problem
Filename:
MIME Type:
Creator:
niekt0
Created:
2009-12-15 14:45:39 UTC
Size:
1.05 KB
patch
obsolete
>*** client.c 2009-10-29 08:47:16.000000000 +0100 >--- client_fixed.c 2009-12-15 18:33:01.000000000 +0100 >*************** >*** 4243,4248 **** >--- 4243,4251 ---- > } > > if (info.count == 2) { >+ >+ char *pathfix; >+ > /* > * Exactly one match in matches[1], indicate this is the one > * in matches[0]. >*************** >*** 4250,4255 **** >--- 4253,4267 ---- > info.matches[0] = info.matches[1]; > info.matches[1] = NULL; > info.count -= 1; >+ >+ // XXX HACK (Fix tab completion to work with spaces in path) >+ i=strlen(info.matches[0]); >+ pathfix = SMB_MALLOC_ARRAY(char, i+2); >+ pathfix[0]='"'; //It is enough to add " at beggining. >+ safe_strcpy(&pathfix[1],info.matches[0],i); >+ SAFE_FREE(info.matches[0]); >+ info.matches[0]=pathfix; >+ > TALLOC_FREE(ctx); > return info.matches; > } >*************** >*** 4261,4266 **** >--- 4273,4281 ---- > > info.matches[0] = SMB_STRNDUP(info.matches[1], info.samelen); > info.matches[info.count] = NULL; >+ >+ TALLOC_FREE(ctx); // XXX Fixed memory leak >+ > return info.matches; > > cleanup:
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 4728
: 5087