[Dovecot] LIST command claims children exist in empty folder
Jonathan Siegle
jsiegle at psu.edu
Wed Mar 25 13:52:41 EET 2009
On Mar 24, 2009, at 11:36 AM, Jonathan Siegle wrote:
> Dovecot 1.2 (8834:5284f45c249a)
>
> Should list return \HasChildren if no folders exist under it? I'm
> using mbox format.
>
>
> 2 create testfolder/
> 2 OK Create completed.
> 3 list "testfolder/" *
> * LIST (\Noselect \HasChildren) "/" "testfolder/"
> 3 OK List completed.
> 4 list "testfolder/" %
> * LIST (\Noselect \HasChildren) "/" "testfolder/"
> 4 OK List completed.
> 5 list "testfolder" %
> * LIST (\Noselect \HasChildren) "/" "testfolder"
> 5 OK List completed.
> 6 list "testfolder" *
> * LIST (\Noselect \HasChildren) "/" "testfolder"
>
>
> Thanks,
> Jonathan
Here is my patch.
diff -r d975ed910613 src/lib-storage/index/mbox/mbox-storage.c
--- a/src/lib-storage/index/mbox/mbox-storage.c Wed Mar 25 07:34:55
2009 -0400
+++ b/src/lib-storage/index/mbox/mbox-storage.c Wed Mar 25 07:44:52
2009 -0400
@@ -888,7 +888,7 @@
path = t_strconcat(dir, "/", fname, NULL);
if (stat(path, &st) == 0) {
if (S_ISDIR(st.st_mode))
- *flags |= MAILBOX_NOSELECT | MAILBOX_CHILDREN;
+ *flags |= MAILBOX_NOSELECT ;
else {
*flags |= MAILBOX_NOINFERIORS |
STAT_GET_MARKED(st);
if (is_inbox_file(ctx->list, path, fname) &&
3 list "testfolder/" *
* LIST (\Noselect \HasChildren) "/" "testfolder/"
3 OK List completed.
4 list "testfolder" %
* LIST (\Noselect \HasNoChildren) "/" "testfolder"
4 OK List completed.
5 list "testfolder" %
* LIST (\Noselect \HasNoChildren) "/" "testfolder"
5 OK List completed.
6 list "testfolder" *
* LIST (\Noselect \HasNoChildren) "/" "testfolder"
6 OK List completed.
So slightly different behavior. Is this correct ?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2541 bytes
Desc: not available
Url : http://dovecot.org/pipermail/dovecot/attachments/20090325/923dc8ec/attachment.bin
More information about the dovecot
mailing list