mirror of
https://github.com/samba-team/samba.git
synced 2024-12-31 17:18:04 +03:00
r5922: Fix for NASTY NASTY bug #2501. All my fault :-(. Brown paper bag time.
Stops Win98 from looping doing findnext on a singleton directory. More testing very welcome. Jeremy.
This commit is contained in:
parent
0d38d5f610
commit
e32a58742e
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user