diff options
author | Jeremy Allison <jra@samba.org> | 2005-02-01 18:33:50 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:55:30 -0500 |
commit | 021011f90030f6f4c39c9ef27db17eec5d4536ad (patch) | |
tree | 98292958a3a2ce9f10c3afcfd622a73b2ccf0bc2 /source3/smbd/notify_hash.c | |
parent | b75ebde786540d24de7a911ae3e55a6d796b19aa (diff) | |
download | samba-021011f90030f6f4c39c9ef27db17eec5d4536ad.tar.gz samba-021011f90030f6f4c39c9ef27db17eec5d4536ad.tar.bz2 samba-021011f90030f6f4c39c9ef27db17eec5d4536ad.zip |
r5160: First cut at refactoring of directory code to handle non-wildcard
directory match more efficiently. Passes RAW-SEARCH under valgrind but needs more
testing (which I'll do later today :-).
Jeremy.
(This used to be commit 0b04dd9d0c6d1fe02d1b5e43f203577bf5466f33)
Diffstat (limited to 'source3/smbd/notify_hash.c')
-rw-r--r-- | source3/smbd/notify_hash.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/source3/smbd/notify_hash.c b/source3/smbd/notify_hash.c index d7cb1139dc..b16b767783 100644 --- a/source3/smbd/notify_hash.c +++ b/source3/smbd/notify_hash.c @@ -76,7 +76,7 @@ static BOOL notify_hash(connection_struct *conn, char *path, uint32 flags, * larger than the max time_t value). */ - dp = OpenDir(conn, path, True); + dp = OpenDir(conn, path); if (dp == NULL) return False; @@ -91,18 +91,22 @@ static BOOL notify_hash(connection_struct *conn, char *path, uint32 flags, offset = 0; while ((fname = ReadDirName(dp, &offset))) { + ZERO_STRUCT(st); if(strequal(fname, ".") || strequal(fname, "..")) continue; + if (!is_visible_file(conn, path, fname, &st, True)) + continue; + data->num_entries++; safe_strcpy(p, fname, remaining_len); - ZERO_STRUCT(st); - /* * Do the stat - but ignore errors. */ - SMB_VFS_STAT(conn,full_name, &st); + if (!VALID_STAT(st)) { + SMB_VFS_STAT(conn,full_name, &st); + } /* * Always sum the times. |