Hi Ilja,

> >strncasecmp() tests if the folder begins with INBOX and thats always
> >true - right? So we have to use strcasecmp(name, "INBOX") right?
> >Confused ...
> 
> Aha, it wasn't as simple as I thought... The 'if' isn't right, because 
> strcasecmp only looks at the first 5 characters, and you just gave the 
> perfect example why this does not work.
> 
> What we can do is the following:
> 
> keep the 'if' as it is.
> 
> Convert the first 5 characters of the name to 'INBOX' (if it starts with 
>  INBOX, in any case (upper, lower, mixed)).
> 
> When we do things this way we get the following results:
> input                 query
> MyBox         ->              MyBox

Oh yes there are folders that aren't below INBOX.

> Inbox         ->              INBOX
> Inbox/MyBox ->                INBOX/MyBox
> 
> etc.
> 
> Makes sense?

Yes sounds good to me.


Thomas
-- 
http://www.tmueller.com for pgp key (95702B3B)

Reply via email to