1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-24 21:49:29 +03:00

Added code to convert empty file names to "." so we avoid

searching the cache, but only if we are not on a print share.

This code is known to work on at least one site!
This commit is contained in:
Richard Sharpe
-
parent ac61a10247
commit a2898af463

View File

@ -368,6 +368,18 @@ BOOL unix_convert(char *name,connection_struct *conn,char *saved_last_component,
trim_string(name,"/","/");
/*
* If we trimmed down to a single '\0' character
* then we should use the "." directory to avoid
* searching the cache, but not if we are in a
* printing share.
*/
if (!*name && (!conn -> printer)) {
name[0] = '.';
name[1] = '\0';
}
/*
* Ensure saved_last_component is valid even if file exists.
*/