Merge pull request #113 from hubearth/master

Allow filtering of folders with spaces
This commit is contained in:
Rodolfo García Peñas (kix) 2022-03-25 11:39:48 +01:00 committed by GitHub
commit dd0edb1446
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -717,6 +717,9 @@ class IMAPRepository(BaseRepository):
try:
for foldername in self.folderincludes:
try:
# Folder names with spaces requires quotes
if ' ' in foldername:
foldername = '"' + foldername + '"'
imapobj.select(imaputil.utf8_IMAP(foldername),
readonly=True)
except OfflineImapError as exc: