Mercurial > dovecot > core-2.2
changeset 9682:80cf689acdb4 HEAD
maildir_list_iter_is_mailbox() should return 0 for non-existing maildirs.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Mon, 27 Jul 2009 18:53:32 -0400 |
parents | cf187692fcfe |
children | b56b06cdd1d7 |
files | src/lib-storage/index/maildir/maildir-storage.c |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/index/maildir/maildir-storage.c Mon Jul 27 18:47:16 2009 -0400 +++ b/src/lib-storage/index/maildir/maildir-storage.c Mon Jul 27 18:53:32 2009 -0400 @@ -867,6 +867,7 @@ { struct stat st, st2; const char *path, *cur_path; + int ret; if (maildir_is_internal_name(fname)) { *flags |= MAILBOX_NONEXISTENT; @@ -898,13 +899,16 @@ } return 0; } + ret = 1; } else if (errno == ENOENT) { /* doesn't exist - probably a non-existing subscribed mailbox */ *flags |= MAILBOX_NONEXISTENT; + ret = 0; } else { /* non-selectable. probably either access denied, or symlink destination not found. don't bother logging errors. */ *flags |= MAILBOX_NOSELECT; + ret = 1; } if ((*flags & (MAILBOX_NOSELECT | MAILBOX_NONEXISTENT)) == 0) { /* make sure it's a selectable mailbox */ @@ -941,7 +945,7 @@ } } } - return 1; + return ret; } static int