Merge pull request #80 from thekix/master
Allow create and delete folders with spaces
This commit is contained in:
commit
f6e9d875e8
@ -772,6 +772,10 @@ 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."""
|
||||||
|
|
||||||
|
# Folder names with spaces requires quotes
|
||||||
|
if ' ' in foldername:
|
||||||
|
foldername = '"' + foldername + '"'
|
||||||
|
|
||||||
if self.account.utf_8_support:
|
if self.account.utf_8_support:
|
||||||
foldername = imaputil.utf8_IMAP(foldername)
|
foldername = imaputil.utf8_IMAP(foldername)
|
||||||
imapobj = self.imapserver.acquireconnection()
|
imapobj = self.imapserver.acquireconnection()
|
||||||
@ -833,6 +837,10 @@ class IMAPRepository(BaseRepository):
|
|||||||
return
|
return
|
||||||
imapobj = self.imapserver.acquireconnection()
|
imapobj = self.imapserver.acquireconnection()
|
||||||
try:
|
try:
|
||||||
|
# Folder names with spaces requires quotes
|
||||||
|
if ' ' in foldername:
|
||||||
|
foldername = '"' + foldername + '"'
|
||||||
|
|
||||||
if self.account.utf_8_support:
|
if self.account.utf_8_support:
|
||||||
foldername = imaputil.utf8_IMAP(foldername)
|
foldername = imaputil.utf8_IMAP(foldername)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user