Mercurial > dovecot > original-hg > dovecot-1.2
diff src/lib-storage/index/dbox/dbox-storage.c @ 7533:7690cdabb3f8 HEAD
dbox & cydir: If mailbox doesn't exist, return it as \nonexistent instead of
\noselect.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sat, 24 May 2008 16:57:28 +0300 |
parents | 7f7003bcf422 |
children | 326ca0ed8983 |
line wrap: on
line diff
--- a/src/lib-storage/index/dbox/dbox-storage.c Sat May 24 16:56:47 2008 +0300 +++ b/src/lib-storage/index/dbox/dbox-storage.c Sat May 24 16:57:28 2008 +0300 @@ -622,12 +622,15 @@ if (st.st_nlink > 2) *flags |= MAILBOX_CHILDREN; } + } else if (errno == ENOENT) { + /* doesn't exist - probably a non-existing subscribed mailbox */ + *flags |= MAILBOX_NONEXISTENT; } else { /* non-selectable. probably either access denied, or symlink destination not found. don't bother logging errors. */ *flags |= MAILBOX_NOSELECT; } - if ((*flags & MAILBOX_NOSELECT) == 0) { + if ((*flags & (MAILBOX_NOSELECT | MAILBOX_NONEXISTENT)) == 0) { /* make sure it's a selectable mailbox */ maildir_path = t_strconcat(path, "/"DBOX_MAILDIR_NAME, NULL); if (stat(maildir_path, &st) < 0 || !S_ISDIR(st.st_mode))