Implement foldersort in a python3 compatible way
By default we sort folders alphabetically (for IMAP) according to their transposed names. For python3, we need to bend a bit backwards to still allow the use of a cmp() function for foldersort. While going through, I discovered that we never sort folders for Maildir. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
This commit is contained in:
@ -496,13 +496,14 @@ remoteuser = username
|
||||
# one. For example:
|
||||
# folderincludes = ['debian.user', 'debian.personal']
|
||||
|
||||
# You can specify foldersort to determine how folders are sorted.
|
||||
# You can specify 'foldersort' to determine how folders are sorted.
|
||||
# This affects order of synchronization and mbnames. The expression
|
||||
# should return -1, 0, or 1, as the default Python cmp() does. The
|
||||
# two arguments, x and y, are strings representing the names of the folders
|
||||
# to be sorted. The sorting is applied *AFTER* nametrans, if any.
|
||||
#
|
||||
# To reverse the sort:
|
||||
# should return -1, 0, or 1, as the default Python cmp() does. The two
|
||||
# arguments, x and y, are strings representing the names of the folders
|
||||
# to be sorted. The sorting is applied *AFTER* nametrans, if any. The
|
||||
# default is to sort IMAP folders alphabetically
|
||||
# (case-insensitive). Usually, you should never have to modify this. To
|
||||
# eg. reverse the sort:
|
||||
#
|
||||
# foldersort = lambda x, y: -cmp(x, y)
|
||||
|
||||
|
Reference in New Issue
Block a user