<<< Date Index >>>     <<< Thread Index >>>

Re: join-threads & RO folder; IMAP ACL checks



On Tuesday, 04 April 2006 at 16:23, Phil Pennock wrote:
> Please find attached a patch for curs_main.c which does two things:
> 
>  (1) OP_MAIN_LINK_THREADS needs to check for IMAP_ACL_DELETE permission,
>      since the thread linking involves deleting the old email
> 
>  (2) makes CHECK_IMAP_ACL() a no-op if USE_IMAP is not defined; then
>      cleans up a bunch of the #ifdef litter.
> 
> I realise that point 2 might be contentious, but put it in one patch
> since manually patching for point 1 is so trivial that there's no real
> harm done if that's rejected.

I've applied it, thanks.

> Is it generally preferred that every reference to IMAP functionality
> always be explicitly wrapped in '#ifdef's?  Personally, a name like
> CHECK_IMAP_ACL() seems clear enough and a text-editor search for "IMAP"
> will find it just as easily as USE_IMAP.  By leaving the #ifdef in just
> one place and providing an '#else', the rest of the code becomes
> cleaner, IMO.

I think you're right. As long as no additional code gets compiled in,
it's nicer to have fewer #ifdefs.