mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-17 19:48:31 +02:00
fix issue #316
Added extra check to make sure that the file specified is the same as in the configuration. If yes, then flip the encrypt flag.
This commit is contained in:
parent
5aabbb7812
commit
319345b5d4
1 changed files with 2 additions and 2 deletions
|
@ -256,14 +256,14 @@ def run(manual_args=None):
|
|||
elif args.encrypt is not False:
|
||||
encrypt(journal, filename=args.encrypt)
|
||||
# Not encrypting to a separate file: update config!
|
||||
if not args.encrypt:
|
||||
if not args.encrypt or args.encrypt == config['journal']:
|
||||
update_config(original_config, {"encrypt": True}, journal_name, force_local=True)
|
||||
install.save_config(original_config, config_path=CONFIG_PATH)
|
||||
|
||||
elif args.decrypt is not False:
|
||||
decrypt(journal, filename=args.decrypt)
|
||||
# Not decrypting to a separate file: update config!
|
||||
if not args.decrypt:
|
||||
if not args.decrypt or args.decrypt == config['journal']:
|
||||
update_config(original_config, {"encrypt": False}, journal_name, force_local=True)
|
||||
install.save_config(original_config, config_path=CONFIG_PATH)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue