From 3bc07b48effda5426311d0e57747ffbb5bed3f39 Mon Sep 17 00:00:00 2001 From: Randall Date: Thu, 21 Jul 2022 01:37:53 -0400 Subject: [PATCH] Fixed encrypt() using global tmp_dir Former-commit-id: 2e993a03f745ae5b4a4f58acc6695e0660bc278c [formerly b6d3f7c5d1a95fb83818f3020d0689968d45872a] Former-commit-id: 9306abe18fe741cdd36280798f4bcffc66a77dd7 --- bin/sshyp.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/sshyp.py b/bin/sshyp.py index 98f827b..41c54b3 100755 --- a/bin/sshyp.py +++ b/bin/sshyp.py @@ -138,9 +138,9 @@ def pass_gen(): # generates and returns a random password based on user-specifi def encrypt(_entry_dir, _shm_folder, _shm_entry, _gpg_com, _gpg_id, _tmp_dir=path.expanduser('~/.config/sshyp/tmp/')): # encrypts an entry and cleans up the temporary files - system(f"{_gpg_com} -qr {str(_gpg_id)} -e '{tmp_dir}{_shm_folder}/{_shm_entry}'") - move(f"{tmp_dir}{_shm_folder}/{_shm_entry}.gpg", f"{_entry_dir}.gpg") - rmtree(f"{tmp_dir}{_shm_folder}") + system(f"{_gpg_com} -qr {str(_gpg_id)} -e '{_tmp_dir}{_shm_folder}/{_shm_entry}'") + move(f"{_tmp_dir}{_shm_folder}/{_shm_entry}.gpg", f"{_entry_dir}.gpg") + rmtree(f"{_tmp_dir}{_shm_folder}") def decrypt(_entry_dir, _shm_folder, _shm_entry, _gpg_command, _tmp_dir=path.expanduser('~/.config/sshyp/tmp/')):