rclpdf.py: opening attachment: need to decode the utf-8 ipath

This commit is contained in:
Jean-Francois Dockes 2022-06-14 14:52:26 +02:00
parent 435620dbb1
commit 6575476d47

View File

@ -516,11 +516,11 @@ class PDFExtractor:
def extractone(self, ipath):
#self.em.rclog("extractone: [%s]" % ipath)
self.em.rclog("extractone: [%s]" % ipath)
if not self.attextractdone:
if not self.extractAttach():
return (False, "", "", rclexecm.RclExecM.eofnow)
path = os.path.join(tmpdir.getpath(), ipath)
path = os.path.join(tmpdir.getpath(), ipath.decode('utf-8'))
if os.path.isfile(path):
f = open(path, "rb")
docdata = f.read();