mirror of
https://github.com/samba-team/samba.git
synced 2025-02-09 09:57:48 +03:00
minor fix and checks
(This used to be commit a034bfb9ef7a4c8a127ac91f4163cc6af98f29b3)
This commit is contained in:
parent
7b671e34f5
commit
c889c29d0d
@ -429,6 +429,7 @@ smb_ucs2_t *unix_clean_path(const smb_ucs2_t *s)
|
|||||||
smb_ucs2_t *p, *r, *t;
|
smb_ucs2_t *p, *r, *t;
|
||||||
|
|
||||||
DEBUG(3, ("unix_clean_path\n")); /* [%unicode]\n")); */
|
DEBUG(3, ("unix_clean_path\n")); /* [%unicode]\n")); */
|
||||||
|
if(!s) return NULL;
|
||||||
|
|
||||||
/* convert '\' to '/' */
|
/* convert '\' to '/' */
|
||||||
ns = strdup_w(s);
|
ns = strdup_w(s);
|
||||||
@ -461,8 +462,8 @@ smb_ucs2_t *unix_clean_path(const smb_ucs2_t *s)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* remove any trailing /. */
|
/* remove any leading ./ trailing /. */
|
||||||
trim_string_wa(ns, NULL, "/.");
|
trim_string_wa(ns, "./", "/.");
|
||||||
|
|
||||||
/* remove any leading and trailing / */
|
/* remove any leading and trailing / */
|
||||||
trim_string_wa(ns, "/", "/");
|
trim_string_wa(ns, "/", "/");
|
||||||
@ -1916,6 +1917,7 @@ BOOL ms_has_wild(char *s)
|
|||||||
BOOL ms_has_wild_w(const smb_ucs2_t *s)
|
BOOL ms_has_wild_w(const smb_ucs2_t *s)
|
||||||
{
|
{
|
||||||
smb_ucs2_t c;
|
smb_ucs2_t c;
|
||||||
|
if (!s) return False;
|
||||||
while ((c = *s++)) {
|
while ((c = *s++)) {
|
||||||
switch (c) {
|
switch (c) {
|
||||||
case UCS2_CHAR('*'):
|
case UCS2_CHAR('*'):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user