mirror of
https://github.com/wassname/FanFicFare.git
synced 2026-09-12 12:02:50 +08:00
Add dblquotes around folder name on IMAP lookup.
This commit is contained in:
@@ -186,7 +186,12 @@ def get_urls_from_imap(srv,user,passwd,folder,markread=True):
|
||||
mail.login(user, passwd)
|
||||
mail.list()
|
||||
# Out: list of "folders" aka labels in gmail.
|
||||
mail.select(folder) # , readonly=True connect to inbox.
|
||||
mail.select('"%s"'%folder) # Needs to be quoted incase there are
|
||||
# spaces, etc. imaplib doesn't
|
||||
# correctly quote folders with spaces.
|
||||
# However, it does check and won't
|
||||
# quote strings that already start and
|
||||
# end with ", so this is safe.
|
||||
|
||||
result, data = mail.uid('search', None, "UNSEEN")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user