mirror of
https://github.com/rwinkhart/sshyp.git
synced 2026-08-29 21:36:31 -04:00
Fixed encrypt() using global tmp_dir
This commit is contained in:
+3
-3
@@ -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/')):
|
||||
|
||||
Reference in New Issue
Block a user