From 2231eaebba29271c28dfbad8e32447b053319025 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Mon, 21 Mar 2005 19:06:13 +0000 Subject: [PATCH] r5925: adding FindNext() fix from 3.0; setting version to 3.0.13 --- source/VERSION | 4 ++-- source/smbd/dir.c | 7 +++++++ 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; -- 2.11.4.GIT