[SCM] Samba Shared Repository - branch v3-2-test updated -
release-3-2-0pre2-3531-g5bdc16a
Jeremy Allison
jra at samba.org
Mon Mar 30 22:10:43 GMT 2009
The branch, v3-2-test has been updated
via 5bdc16a867b9c14682b327c79f79834edcd6842d (commit)
from e7634cd0c17d0fa4dcca5952313b6af750477dec (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test
- Log -----------------------------------------------------------------
commit 5bdc16a867b9c14682b327c79f79834edcd6842d
Author: Jeremy Allison <jra at samba.org>
Date: Mon Mar 30 15:09:10 2009 -0700
Ensure files starting with multiple dots are hidden
if "hide dot files" is set. Thanks to Barry Kelly <bkelly.ie at gmail.com>
for pointing this one out.
Jeremy.
-----------------------------------------------------------------------
Summary of changes:
source/smbd/dosmode.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/smbd/dosmode.c b/source/smbd/dosmode.c
index 69100bf..8a5a7b0 100644
--- a/source/smbd/dosmode.c
+++ b/source/smbd/dosmode.c
@@ -319,8 +319,10 @@ uint32 dos_mode_msdfs(connection_struct *conn, const char *path,SMB_STRUCT_STAT
} else {
p = path;
}
-
- if (p[0] == '.' && p[1] != '.' && p[1] != 0) {
+
+ /* Only . and .. are not hidden. */
+ if (p[0] == '.' && !((p[1] == '\0') ||
+ (p[1] == '.' && p[2] == '\0'))) {
result |= aHIDDEN;
}
}
@@ -371,8 +373,10 @@ uint32 dos_mode(connection_struct *conn, const char *path,SMB_STRUCT_STAT *sbuf)
} else {
p = path;
}
-
- if (p[0] == '.' && p[1] != '.' && p[1] != 0) {
+
+ /* Only . and .. are not hidden. */
+ if (p[0] == '.' && !((p[1] == '\0') ||
+ (p[1] == '.' && p[2] == '\0'))) {
result |= aHIDDEN;
}
}
--
Samba Shared Repository
More information about the samba-cvs
mailing list