remove wrong inbox folders

This commit is contained in:
holger krekel
2020-06-05 20:22:35 +02:00
parent 882f90b5ff
commit e29dcbf8eb
2 changed files with 5 additions and 4 deletions

View File

@@ -140,8 +140,8 @@ class ImapConn:
typ, data = c.fetch(num, '(UID FLAGS)')
info = data[0]
path = pathlib.Path(dir).joinpath("IMAP-MESSAGES", acinfo, imapfolder)
path = pathlib.Path(dir.strpath).joinpath("IMAP-MESSAGES", acinfo, imapfolder)
path.mkdir(parents=True, exist_ok=True)
file = path.joinpath(str(info).replace("b'", "").replace("'", "").replace("\\", ""))
file.write_bytes(body)
log("Message", info, "saved as", file)
fn = path.joinpath(str(info).replace("b'", "").replace("'", "").replace("\\", ""))
fn.write_bytes(body)
log("Message", info, "saved as", fn)