summaryrefslogtreecommitdiff
path: root/source3/smbd/statcache.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd/statcache.c')
-rw-r--r--source3/smbd/statcache.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source3/smbd/statcache.c b/source3/smbd/statcache.c
index fbebdb240f..28915a30a0 100644
--- a/source3/smbd/statcache.c
+++ b/source3/smbd/statcache.c
@@ -66,11 +66,12 @@ void stat_cache_add( const char *full_orig_name, const char *orig_translated_pat
return;
/*
- * Don't cache trivial valid directory entries.
+ * Don't cache trivial valid directory entries such as . and ..
*/
- if((*full_orig_name == '\0') || (strcmp(full_orig_name, ".") == 0) ||
- (strcmp(full_orig_name, "..") == 0))
+ if((*full_orig_name == '\0') || (full_orig_name[0] == '.' &&
+ ((full_orig_name[1] == '\0') ||
+ (full_orig_name[1] == '.' && full_orig_name[1] == '\0'))))
return;
/*