utf8foldernames: fix missing decode argument

Github-ref: https://github.com/OfflineIMAP/offlineimap/issues/502
Tested-by: https://github.com/pprw
Reviewed-by: Ilias Tsitsimpis <i.tsitsimpis@gmail.com>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
Nicolas Sebrecht
2017-10-26 18:23:15 +02:00
parent a79263bb31
commit 5836970d51
4 changed files with 16 additions and 8 deletions

View File

@ -1,6 +1,6 @@
""" Base repository support """
# Copyright (C) 2002-2016 John Goerzen & contributors
# Copyright (C) 2002-2017 John Goerzen & contributors
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -165,7 +165,13 @@ class BaseRepository(CustomConfig.ConfigHelperMixin):
def deletefolder(self, foldername):
raise NotImplementedError
def getfolder(self, foldername):
def getfolder(self, foldername, decode=True):
"""Get the folder for this repo.
WARNING: the signature changes whether it's remote or local:
- remote types have the decode arg
- local types don't have the decode arg
"""
raise NotImplementedError
def sync_folder_structure(self, local_repo, status_repo):

View File

@ -19,6 +19,7 @@
from offlineimap.repository.IMAP import IMAPRepository
from offlineimap import folder, OfflineImapError
class GmailRepository(IMAPRepository):
"""Gmail IMAP repository.
@ -87,9 +88,9 @@ class GmailRepository(IMAPRepository):
def getpreauthtunnel(self):
return None
def getfolder(self, foldername):
def getfolder(self, foldername, decode=True):
return self.getfoldertype()(self.imapserver, foldername,
self)
self, decode)
def getfoldertype(self):
return folder.Gmail.GmailFolder

View File

@ -1,6 +1,6 @@
""" IMAP repository support """
# Copyright (C) 2002-2016 John Goerzen & contributors
# Copyright (C) 2002-2017 John Goerzen & contributors
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by