Bug in get_create_folders?

Eygene Ryabinkin rea at codelabs.ru
Sun Sep 29 10:34:17 UTC 2013


Florian, good day.

Sat, Sep 28, 2013 at 01:45:24PM +0200, Florian Lindner wrote:
>     def get_create_folders(self):
>         """Is folder creation enabled on this repository?                                                                                                                                                                                                                      
>                                                                                                                                                                                                                                                                                
>         It is disabled by either setting the whole repository                                                                                                                                                                                                                  
>         'readonly' or by using the 'createfolders' setting."""
>         return self._readonly or self.getconfboolean('createfolders', True)
> 
> in Base.py.
> 
> should the last line not rather be?
> 
> return (not self._readonly) and self.getconfboolean('createfolders', True)
> 
> It should only return True if (readonly is False) and (createfolders is True).

It was already fixed in 6e5fbebc and 925a5bca, so currently we have
{{{
    def get_create_folders(self):
        """Is folder creation enabled on this repository?

        It is disabled by either setting the whole repository
        'readonly' or by using the 'createfolders' setting."""
        return (not self._readonly) and \
            self.getconfboolean('createfolders', True)
}}}
and this fix is a part of 6.5.5 that will be out at the next week.

Thanks for reporting!
-- 
rea



More information about the OfflineIMAP-project mailing list