string_sub(s, "//","/");
/* Remove leading ./ characters */
- trim_string(s, "./", NULL);
+ if(strncmp(s, "./", 2) == 0) {
+ trim_string(s, "./", NULL);
+ if(*s == 0)
+ strcpy(s,"./");
+ }
while ((p = strstr(s,"/../")) != NULL)
{
DEBUG(3,("Illegal file name? (%s)\n",s));
return(False);
}
+
+ if (strlen(s) == 0)
+ strcpy(s,"./");
+
return(True);
}