[ANNOUNCE] OfflineIMAP v6.4.0
Sebastian at SSpaeth.de
Thu Dec 1 16:08:45 GMT 2011
On Thu, 24 Nov 2011 12:59:51 +0000, Peter Lewis <pete at muddygoat.org> wrote:
> I've just upgraded to 4.6.0 and have been trying to do implement my reverse
> nametrans today. There is a slight complication is that the remote repository
> uses . as a separator, while locally I use /. But, I understand that offlineimap
> handles that part of the translation automatically for me. And I don't think
> that that is the problem.
> My issue seems to be that offlineimap sees some local maildir folders as having
> trailing slashes, while not others. Firstly, I got this:
> ERROR: INFINITE FOLDER CREATION DETECTED! Folder 'Personal/Archive/2010/'
> (repository 'LocalPersonal') would be created as folder 'Archive.2010'
> (repository 'RemotePersonal'). The latter becomes 'Personal/Archive/2010' in
> return, leading to infinite folder creation cycles.
Aye, bug identified is bug half fixed. There was a real bug when we were
using "/" as a folder separator in local maildirs that wrongly caused
trailing slashes. This has been fixed by this commit which I have put
into both the next and master branches of my repository.
Let me know if this is really fixed now, when you use that. This would
justify releasing a bug fix release pretty soonish.
diff --git a/Changelog.draft.rst b/Changelog.draft.rst
index 92c57a1..3261465 100644
@@ -36,3 +36,7 @@ Bug Fixes
rather mysterious "TypeError: expected a character buffer object"
error. Fix this my retrieving the list of folders early enough even
for readonly repositories.
+* Fix regression from 6.4.0. When using local Maildirs with "/" as a
+ folder separator, all folder names would get a trailing slash
+ appended, which is plain wrong.
diff --git a/offlineimap/repository/Maildir.py b/offlineimap/repository/Maildir.py
index 6e93839..70a5ca3 100644
@@ -160,7 +160,7 @@ class MaildirRepository(BaseRepository):
# Not a directory -- not a folder.
foldername = dirname
- if extension != None:
+ if extension and dirname != '':
foldername = os.path.join(extension, dirname)
if (os.path.isdir(os.path.join(fullname, 'cur')) and
os.path.isdir(os.path.join(fullname, 'new')) and
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 197 bytes
Desc: not available
More information about the OfflineIMAP-project