From caaa95361678f553568b7a3d863cb5118b5283a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20=28kix=29?= Date: Tue, 1 Sep 2020 18:10:03 +0200 Subject: [PATCH] IMAP.py list folders This patch changes the refernce to "", because now the empty string is not saved as '""', is just '', so the fecth command fails. Then, I changed the fech call to "" "*", using refernce "" and pattern "*". --- offlineimap/repository/IMAP.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/offlineimap/repository/IMAP.py b/offlineimap/repository/IMAP.py index 329a189..a97e2c9 100644 --- a/offlineimap/repository/IMAP.py +++ b/offlineimap/repository/IMAP.py @@ -350,7 +350,7 @@ class IMAPRepository(BaseRepository): return self.getconf('transporttunnel', None) def getreference(self): - return self.getconf('reference', '') + return self.getconf('reference', '""') def getdecodefoldernames(self): return self.getconfboolean('decodefoldernames', False) @@ -454,7 +454,7 @@ class IMAPRepository(BaseRepository): listfunction = imapobj.lsub try: - result, listresult = listfunction(directory=self.imapserver.reference) + result, listresult = listfunction(directory=self.imapserver.reference, pattern='"*"') if result != 'OK': raise OfflineImapError("Could not list the folders for" " repository %s. Server responded: %s" %