1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-03 13:47:25 +03:00

minor fix and checks

(This used to be commit a034bfb9ef7a4c8a127ac91f4163cc6af98f29b3)
This commit is contained in:
Simo Sorce 2002-01-27 16:37:12 +00:00
parent 7b671e34f5
commit c889c29d0d

View File

@ -429,6 +429,7 @@ smb_ucs2_t *unix_clean_path(const smb_ucs2_t *s)
smb_ucs2_t *p, *r, *t;
DEBUG(3, ("unix_clean_path\n")); /* [%unicode]\n")); */
if(!s) return NULL;
/* convert '\' to '/' */
ns = strdup_w(s);
@ -461,8 +462,8 @@ smb_ucs2_t *unix_clean_path(const smb_ucs2_t *s)
}
}
/* remove any trailing /. */
trim_string_wa(ns, NULL, "/.");
/* remove any leading ./ trailing /. */
trim_string_wa(ns, "./", "/.");
/* remove any leading and trailing / */
trim_string_wa(ns, "/", "/");
@ -1916,6 +1917,7 @@ BOOL ms_has_wild(char *s)
BOOL ms_has_wild_w(const smb_ucs2_t *s)
{
smb_ucs2_t c;
if (!s) return False;
while ((c = *s++)) {
switch (c) {
case UCS2_CHAR('*'):