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-folder::
|
||||||
Delete a folder on the remote repository.
|
Delete a folder on the remote repository.
|
||||||
+
|
+
|
||||||
Only one account must be specified/configured for this feature to work. The
|
Only one account must be specified/configured for this feature to work or you
|
||||||
folder name must be provided in IMAP encoding with the remote separators (likely
|
must provide one account with -a. The folder name must be provided with the
|
||||||
'/'). E.g.: "Remote/folder/name".
|
remote separators (likely '/') in UTF-8 if utf8foldernames is enabled or in IMAP
|
||||||
|
otherwise. E.g.: "Remote/folder/name".
|
||||||
|
|
||||||
|
|
||||||
--migrate-fmd5-using-nametrans::
|
--migrate-fmd5-using-nametrans::
|
||||||
|
@ -524,6 +524,8 @@ class IMAPRepository(BaseRepository):
|
|||||||
def deletefolder(self, foldername):
|
def deletefolder(self, foldername):
|
||||||
"""Delete a folder on the IMAP server."""
|
"""Delete a folder on the IMAP server."""
|
||||||
|
|
||||||
|
if self.account.utf_8_support:
|
||||||
|
foldername = imaputil.utf8_IMAP(foldername)
|
||||||
imapobj = self.imapserver.acquireconnection()
|
imapobj = self.imapserver.acquireconnection()
|
||||||
try:
|
try:
|
||||||
result = imapobj.delete(foldername)
|
result = imapobj.delete(foldername)
|
||||||
|
Loading…
Reference in New Issue
Block a user