[Dovecot] Re: Bug#224092: Dovecot IMAP: detection of folders

Timo Sirainen tss at iki.fi
Sat Dec 20 18:47:20 EET 2003


On Dec 20, 2003, at 2:20 PM, Jeroen van Disseldorp wrote:

> On Saturday 20 December 2003 04:40, Timo Sirainen wrote:
>> If I did add special check for ".imap", it would mean that you
>> couldn't create a root folder called "imap" which I think some people
>> might actually do.
>
> I understand. However, making a simple check for being a file or
> directory wouldn't harm anyone. As .subscriptions, .customflags
> and .imap* are all files, interpreting them as folders would generate
> errors anyhow. If .imap* is somehow renamed to .whatever or
> dovecot-whatever, the check would still hold as files would never be
> interpreted as mail folders.

It would hurt performance with very little gain. Now I can just do it 
all with opendir() and readdir() which is usually 2-3 syscalls. If I 
wanted to know if each entry is file or directory, I'd have to call 
stat() for each entry. This could be done for those few special cases I 
guess, but I wouldn't add it for everything..
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
URL: <http://dovecot.org/pipermail/dovecot/attachments/20031220/d98ae4d6/attachment-0001.bin>


More information about the dovecot mailing list