mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-28 18:02:38 +02:00
fix regression: --output-filename fails
--output-filename failed with the message:
Safe PDF filename is not writable
Bug introduced in commit 95ed346
.
This commit is contained in:
parent
83e6b0475f
commit
6b385abfef
1 changed files with 2 additions and 2 deletions
|
@ -52,7 +52,7 @@ def cli_main(
|
|||
return
|
||||
|
||||
try:
|
||||
with open(os.path.abspath(output_filename), "rb") as f:
|
||||
with open(os.path.abspath(output_filename), "wb"):
|
||||
pass
|
||||
except:
|
||||
valid = False
|
||||
|
@ -68,7 +68,7 @@ def cli_main(
|
|||
f"{os.path.splitext(common.input_filename)[0]}-safe.pdf"
|
||||
)
|
||||
try:
|
||||
with open(common.output_filename, "rb") as f:
|
||||
with open(common.output_filename, "wb"):
|
||||
pass
|
||||
except:
|
||||
click.echo(
|
||||
|
|
Loading…
Reference in a new issue