mirror of
https://github.com/pulb/mailnag.git
synced 2026-05-07 11:46:51 +02:00
Fix folder parsing. Fixes issue #108
This commit is contained in:
@@ -103,9 +103,19 @@ class Account:
|
||||
finally:
|
||||
# conn.close() # allowed in SELECTED state only
|
||||
conn.logout()
|
||||
|
||||
separators = [ ' "/" ', ' "." ' ]
|
||||
for d in data:
|
||||
folder = ''
|
||||
for s in separators:
|
||||
if s in d:
|
||||
folder = d.split(s)[-1]
|
||||
break
|
||||
|
||||
if len(folder) == 0:
|
||||
logging.warning("Folder format not supported.")
|
||||
break
|
||||
|
||||
for s in data:
|
||||
folder = s.split(' "/" ')[-1]
|
||||
if (folder[0] == '"') and (folder[-1] == '"'):
|
||||
folder = folder[1:-1]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user