mirror of
https://github.com/samba-team/samba.git
synced 2025-01-19 10:03:58 +03:00
r6417: Strange old IRIX systems return -1 for telldir() when
end of directory reached. Don't check for that and bail when reading directory entries as it's a valid value. Excellent work from Cale Fairchild <cale@brocku.ca> tracked this down. Jeremy. (This used to be commit a60fe9aba16eac4f195a2359d8b7672d8c8aa240)
This commit is contained in:
parent
6b705097d4
commit
d0a0930485
@ -1038,11 +1038,7 @@ const char *ReadDirName(struct smb_Dir *dirp, long *poffset)
|
||||
while ((n = vfs_readdirname(conn, dirp->dir))) {
|
||||
struct name_cache_entry *e;
|
||||
dirp->offset = SMB_VFS_TELLDIR(conn, dirp->dir);
|
||||
if (dirp->offset == -1) {
|
||||
return NULL;
|
||||
}
|
||||
dirp->name_cache_index = (dirp->name_cache_index+1) % NAME_CACHE_SIZE;
|
||||
|
||||
e = &dirp->name_cache[dirp->name_cache_index];
|
||||
SAFE_FREE(e->name);
|
||||
e->name = SMB_STRDUP(n);
|
||||
|
Loading…
x
Reference in New Issue
Block a user