summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2005-03-21 19:06:13 +0000
committerGerald Carter <jerry@samba.org>2005-03-21 19:06:13 +0000
commit2231eaebba29271c28dfbad8e32447b053319025 (patch)
tree1d704c5c50864445c9e0213b8880c4db1a03f100
parent10c9d36fc7c16e5c28e08bcec354effcd0e66d0c (diff)
downloadsamba-2231eaebba29271c28dfbad8e32447b053319025.tar.gz
r5925: adding FindNext() fix from 3.0; setting version to 3.0.13
-rw-r--r--source/VERSION4
-rw-r--r--source/smbd/dir.c7
2 files changed, 9 insertions, 2 deletions
diff --git a/source/VERSION b/source/VERSION
index 13c216d5554..46d8ff2bdb3 100644
--- a/source/VERSION
+++ b/source/VERSION
@@ -19,7 +19,7 @@
########################################################
SAMBA_VERSION_MAJOR=3
SAMBA_VERSION_MINOR=0
-SAMBA_VERSION_RELEASE=12
+SAMBA_VERSION_RELEASE=13
########################################################
# For 'pre' releases the version will be #
@@ -51,7 +51,7 @@ SAMBA_VERSION_RC_RELEASE=
# e.g. SAMBA_VERSION_IS_SVN_SNAPSHOT=yes #
# -> "3.0.0-SVN-build-199" #
########################################################
-SAMBA_VERSION_IS_SVN_SNAPSHOT=
+SAMBA_VERSION_IS_SVN_SNAPSHOT=yes
########################################################
# This can be set by vendors if they want... #
diff --git a/source/smbd/dir.c b/source/smbd/dir.c
index db16b8a6e00..1ec35d839c2 100644
--- a/source/smbd/dir.c
+++ b/source/smbd/dir.c
@@ -595,6 +595,13 @@ const char *dptr_ReadDirName(struct dptr_struct *dptr, long *poffset, SMB_STRUCT
BOOL dptr_SearchDir(struct dptr_struct *dptr, const char *name, long *poffset, SMB_STRUCT_STAT *pst)
{
ZERO_STRUCTP(pst);
+
+ if (!dptr->has_wild && (dptr->dir_hnd->offset == -1)) {
+ /* This is a singleton directory and we're already at the end. */
+ *poffset = -1;
+ return False;
+ }
+
while (SearchDir(dptr->dir_hnd, name, poffset) == True) {
if (is_visible_file(dptr->conn, dptr->path, name, pst, True)) {
return True;