mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-28 18:02:38 +02:00
Need to keep the rename step
This commit is contained in:
parent
7c4f35e0f8
commit
cbdb741f7b
1 changed files with 9 additions and 0 deletions
|
@ -111,6 +111,15 @@ def convert(input_filename, output_filename, ocr_lang, stdout_callback):
|
||||||
if ret != 0:
|
if ret != 0:
|
||||||
print("pixels-to-pdf failed")
|
print("pixels-to-pdf failed")
|
||||||
else:
|
else:
|
||||||
|
# Move the final file to the right place
|
||||||
|
if os.path.exists(output_filename):
|
||||||
|
os.remove(output_filename)
|
||||||
|
|
||||||
|
container_output_filename = os.path.join(
|
||||||
|
safe_dir, "safe-output-compressed.pdf"
|
||||||
|
)
|
||||||
|
os.rename(container_output_filename, output_filename)
|
||||||
|
|
||||||
# We did it
|
# We did it
|
||||||
success = True
|
success = True
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue