From 8b6f10e2e78669125995e9445491a487179500ba Mon Sep 17 00:00:00 2001 From: Eygene Ryabinkin Date: Tue, 27 Aug 2013 16:23:12 +0400 Subject: [PATCH] Pass folder names for the foldersort function Bring the description in the template offlineimap.conf in sync to the actual implementation: pass folder names to the sorting function, not the offlineimap.folder.IMAP.IMAPFolder objects themselves. GitHub issue: https://github.com/OfflineIMAP/offlineimap/issues/27 Signed-off-by: Eygene Ryabinkin --- Changelog.rst | 2 ++ offlineimap/repository/IMAP.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Changelog.rst b/Changelog.rst index db31674..2e621f5 100644 --- a/Changelog.rst +++ b/Changelog.rst @@ -23,6 +23,8 @@ WIP (add new stuff for the next release) (Andreas Mack) * Allow to set message access and modification timestamps based on the "Date" header of the message itself. (Cyril Russo) +* [regression] pass folder names to the foldersort function, + revert the documented behaviour OfflineIMAP v6.5.5-rc1 (2012-09-05) =================================== diff --git a/offlineimap/repository/IMAP.py b/offlineimap/repository/IMAP.py index 2b65de0..19db50f 100644 --- a/offlineimap/repository/IMAP.py +++ b/offlineimap/repository/IMAP.py @@ -365,7 +365,7 @@ class IMAPRepository(BaseRepository): def __init__(self, obj, *args): self.obj = obj def __cmp__(self, other): - return mycmp(self.obj, other.obj) + return mycmp(self.obj.getvisiblename(), other.obj.getvisiblename()) return K retval.sort(key=cmp2key(self.foldersort))