dovecot-2.2: lib-fs: Fixed iteration with POSIX backend.
dovecot at dovecot.org
dovecot at dovecot.org
Mon Nov 26 23:03:18 EET 2012
details: http://hg.dovecot.org/dovecot-2.2/rev/bc497e533da4
changeset: 15398:bc497e533da4
user: Timo Sirainen <tss at iki.fi>
date: Mon Nov 26 23:01:53 2012 +0200
description:
lib-fs: Fixed iteration with POSIX backend.
diffstat:
src/lib-fs/fs-posix.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diffs (23 lines):
diff -r bd01ca99bee5 -r bc497e533da4 src/lib-fs/fs-posix.c
--- a/src/lib-fs/fs-posix.c Mon Nov 26 23:01:28 2012 +0200
+++ b/src/lib-fs/fs-posix.c Mon Nov 26 23:01:53 2012 +0200
@@ -686,10 +686,16 @@
errno = 0;
while ((d = readdir(iter->dir)) != NULL) {
#ifdef HAVE_DIRENT_D_TYPE
- if (d->d_type != DT_DIR) {
- if (d->d_type == DT_UNKNOWN &&
- fs_posix_iter_want(iter->path, d->d_name))
+ switch (d->d_type) {
+ case DT_UNKNOWN:
+ if (!fs_posix_iter_want(iter->path, d->d_name))
+ break;
+ /* fall through */
+ case DT_REG:
+ case DT_LNK:
return d->d_name;
+ default:
+ break;
}
#else
if (fs_posix_iter_want(iter->path, d->d_name))
More information about the dovecot-cvs
mailing list