fix call to OCR when not disabled
This commit is contained in:
parent
35bb78fbab
commit
a8f358bcd5
|
@ -22,7 +22,7 @@ def process(cfg, filename, payload, enable_ocr=True):
|
|||
fd.write(payload)
|
||||
fd.close()
|
||||
|
||||
if not os.path.exists(ocr_filename) and not enable_ocr:
|
||||
if not os.path.exists(ocr_filename) and enable_ocr:
|
||||
fd, tmpfilename = tempfile.mkstemp(suffix='.pdf', prefix='ocrloader-')
|
||||
os.write(fd, payload)
|
||||
os.close(fd)
|
||||
|
|
Reference in New Issue