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..