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
"*".
This commit is contained in:
Rodolfo García Peñas (kix) 2020-09-01 18:10:03 +02:00
parent 7947aea7a9
commit caaa953616

View File

@ -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" %