utf8foldernames: support --delete-folder with UTF-8 folder name
Github-ref: https://github.com/OfflineIMAP/offlineimap/issues/505 Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
parent
ee17e3dc3c
commit
a79263bb31
@ -160,9 +160,10 @@ blinkenlights, machineui.
|
||||
--delete-folder::
|
||||
Delete a folder on the remote repository.
|
||||
+
|
||||
Only one account must be specified/configured for this feature to work. The
|
||||
folder name must be provided in IMAP encoding with the remote separators (likely
|
||||
'/'). E.g.: "Remote/folder/name".
|
||||
Only one account must be specified/configured for this feature to work or you
|
||||
must provide one account with -a. The folder name must be provided with the
|
||||
remote separators (likely '/') in UTF-8 if utf8foldernames is enabled or in IMAP
|
||||
otherwise. E.g.: "Remote/folder/name".
|
||||
|
||||
|
||||
--migrate-fmd5-using-nametrans::
|
||||
|
@ -524,6 +524,8 @@ class IMAPRepository(BaseRepository):
|
||||
def deletefolder(self, foldername):
|
||||
"""Delete a folder on the IMAP server."""
|
||||
|
||||
if self.account.utf_8_support:
|
||||
foldername = imaputil.utf8_IMAP(foldername)
|
||||
imapobj = self.imapserver.acquireconnection()
|
||||
try:
|
||||
result = imapobj.delete(foldername)
|
||||
|
Loading…
Reference in New Issue
Block a user