markup: decode attachment pdf name

This commit is contained in:
2019-11-07 14:33:13 -08:00
parent 16708c59b1
commit 52e59fc94c

View File

@ -65,6 +65,7 @@ def process_message(path):
def process_attachment(from_address, subject, attachment): def process_attachment(from_address, subject, attachment):
# write out pdf # write out pdf
pdf_name = attachment.get_filename() pdf_name = attachment.get_filename()
pdf_name = str(make_header(decode_header(pdf_name)))
pdf_base = Path(pdf_name).stem pdf_base = Path(pdf_name).stem
workdir = os.path.join(WORKDIR, clean_path(from_address), pdf_base) workdir = os.path.join(WORKDIR, clean_path(from_address), pdf_base)