Allow filtering of folders with spaces

This patch adds support to filter folders with the space caracter.

When the folder includes spaces, the folder name must be quoted.
This commit is basicaly a copy-paste of commit 81bd57e4

Signed-off-by: Hubert Pineault <hpineault@riseup.net>
This commit is contained in:
Hubert Pineault 2022-03-20 11:36:01 -04:00
parent e64c254072
commit 7b408b0c58

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: