diff options
author | Richard Sharpe <sharpe@samba.org> | 1998-10-09 10:03:19 +0000 |
---|---|---|
committer | Richard Sharpe <sharpe@samba.org> | 1998-10-09 10:03:19 +0000 |
commit | 7c45b3c25c665d65cfdb503724efe094b5172c12 (patch) | |
tree | 7fe4a0ea119912f9360be710c3911ee49012dbb6 /source3/smbd | |
parent | 4c2b041e78ccac4a71b368e6998644cab3140ff7 (diff) | |
download | samba-7c45b3c25c665d65cfdb503724efe094b5172c12.tar.gz samba-7c45b3c25c665d65cfdb503724efe094b5172c12.tar.bz2 samba-7c45b3c25c665d65cfdb503724efe094b5172c12.zip |
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 used to be commit a2898af463132147cbe19b18585c793960cb39ee)
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/filename.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c index d311d56b99..1b4f7f8c77 100644 --- a/source3/smbd/filename.c +++ b/source3/smbd/filename.c @@ -369,6 +369,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. */ |