[PATCH] Allow empty foldernames

Vladimir Marek Vladimir.Marek at Oracle.COM
Wed Aug 17 13:27:26 BST 2011


The patch looks good and does what it's supposed to do ...

> --- a/offlineimap/repository/LocalStatus.py
> +++ b/offlineimap/repository/LocalStatus.py
> @@ -50,10 +50,17 @@ class LocalStatusRepository(BaseRepository):
>          return '.'
>  
>      def getfolderfilename(self, foldername):
> -        """Return the full path of the status file"""
> -        # replace with 'dot' if final path name is '.'
> -        foldername = re.sub('(^|\/)\.$','\\1dot', foldername)
> -        return os.path.join(self.directory, foldername)
> +        """Return the full path of the status file
> +
> +        This mimics the path that Folder().getfolderbasename() would return"""
> +        if not foldername:
> +            basename == '.'
                        ^^
Apart from this bit :)

Thank you
-- 
	Vlad




More information about the OfflineIMAP-project mailing list