Mercurial > dovecot > core-2.2
changeset 22813:4fe2e5822180
fs-posix: Fix iterating directories when readdir() returns DT_UNKNOWN
Files were iterated correctly, but directories weren't. This mainly broke
directory iteration with NFS when nordirplus mount option was used.
author | Timo Sirainen <timo.sirainen@dovecot.fi> |
---|---|
date | Tue, 06 Feb 2018 12:37:34 +0200 |
parents | ae87a7535b2a |
children | 2d409988e1c8 |
files | src/lib-fs/fs-posix.c |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-fs/fs-posix.c Mon Feb 05 22:21:13 2018 +0200 +++ b/src/lib-fs/fs-posix.c Tue Feb 06 12:37:34 2018 +0200 @@ -844,9 +844,9 @@ #ifdef HAVE_DIRENT_D_TYPE switch (d->d_type) { case DT_UNKNOWN: - if (!fs_posix_iter_want(iter, d->d_name)) - break; - /* fall through */ + if (fs_posix_iter_want(iter, d->d_name)) + return d->d_name; + break; case DT_REG: case DT_LNK: if ((iter->iter.flags & FS_ITER_FLAG_DIRS) == 0)