createfolders setting is ignored if readonly is True (6.5.4)
Vladimir Nesov
robotact at gmail.com
Mon Aug 20 14:42:49 BST 2012
On Mon, Aug 20, 2012 at 4:44 PM, Nicolas Sebrecht
<nicolas.s-dev at laposte.net> wrote:
> On Fri, Aug 17, 2012 at 05:52:20PM +0000, Vladimir Nesov wrote:
>
>> Seem like there was a bug in the new get_create_folders method:
>> if 'readonly' flag is set to true, folders are created
>> regardless of 'createfolders'.
>
> Looks like correct logic fix but I wonder if this couldn't introduce
> issues.
>
> I didn't take a deep look at the code, so please tell me if I'm wrong.
>
> readonly option is for read /only/ purpose. Old behavior would prevent
> from folder creation if IMAP is marked as readonly. Is it still the case
> with this patch?
If 'readonly' is True, folders shouldn't be created (regardless of
'createfolders'; sorry for the confusing thread title). With old
behavior, instead folders were always created when 'readonly' is True
(even if 'createfolders' was also False), which is a serious bug
(offlineimap was creating folders in all read-only repositories).
'createfolders' should only play a role if 'readonly' is False, in
which case folders should only be created if 'createfolders' is True.
--
Vladimir Nesov
More information about the OfflineIMAP-project
mailing list