Author: jra Date: 2005-04-01 19:57:17 +0000 (Fri, 01 Apr 2005) New Revision: 6168
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=6168 Log: Fix bug #2563. Infinite loop on non-existant file with findnext. Jeremy Modified: trunk/source/smbd/dir.c Changeset: Modified: trunk/source/smbd/dir.c =================================================================== --- trunk/source/smbd/dir.c 2005-04-01 18:14:24 UTC (rev 6167) +++ trunk/source/smbd/dir.c 2005-04-01 19:57:17 UTC (rev 6168) @@ -573,8 +573,6 @@ } } - dptr->has_wild = True; - /* In case sensitive mode we don't search - we know if it doesn't exist with a stat we will fail. */ @@ -584,6 +582,7 @@ dptr->dir_hnd->offset = *poffset = -1; return NULL; } else { + dptr->has_wild = True; return dptr_normal_ReadDirName(dptr, poffset, pst); } } @@ -602,7 +601,7 @@ return False; } - while (SearchDir(dptr->dir_hnd, name, poffset) == True) { + if (SearchDir(dptr->dir_hnd, name, poffset)) { if (is_visible_file(dptr->conn, dptr->path, name, pst, True)) { return True; }