summaryrefslogtreecommitdiff
path: root/source3/smbd/filename.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd/filename.c')
-rw-r--r--source3/smbd/filename.c12
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.
*/