while (*start) {
while ((*start) && (*start != '('))
start++;
- start++; /* Skip the ( */
if (!*start)
continue; /* Always check for the end. */
+ start++; /* Skip the ( */
end = start; /* Search for the ' ' or a ')' */
DEBUG(5,("Start of first in pair '%s'\n", start));
while ((*end) && !((*end == ' ') || (*end == ')')))
if (!name_map_mangle(name2,False,SNUM(cnum))) continue;
if ((mangled && mangled_equal(name,name2))
- || fname_equal(name, dname))
+ || fname_equal(name, name2)) /* name2 here was changed to dname - since 1.9.16p2 - not sure of reason (jra) */
{
/* we've found the file, change it's name and return */
if (docache) DirCacheAdd(path,name,dname,SNUM(cnum));
strcpy(fname,dname);
- if(mask_match(fname, mask, case_sensitive, True))
+ if(name_map_mangle(fname,False,SNUM(cnum)) &&
+ mask_match(fname, mask, case_sensitive, True))
{
BOOL isdots = (strequal(fname,"..") || strequal(fname,"."));
if (dont_descend && !isdots)
strcpy(pathreal,Connections[cnum].dirpath);
if(needslash)
strcat(pathreal,"/");
- strcat(pathreal,fname);
+ strcat(pathreal,dname);
if (sys_stat(pathreal,&sbuf) != 0)
{
DEBUG(5,("get_lanman2_dir_entry:Couldn't stat [%s] (%s)\n",pathreal,strerror(errno)));
}
}
-
-
p = pdata;
nameptr = p;
- name_map_mangle(fname,False,SNUM(cnum));
-
nt_extmode = mode ? mode : NT_FILE_ATTRIBUTE_NORMAL;
switch (info_level)