Fixed bugs causing entries to not be saved or entries being saved to the wrong place

Former-commit-id: b8ff6c48caefdd051bc54705a9c08bf41add925a [formerly 772eaa0846]
Former-commit-id: 1700df7af1a9b1ce30ca881e8bfc5f6c42ed1666
This commit is contained in:
2022-10-10 17:52:14 -04:00
parent 612f288904
commit 21287ca57f
+4 -4
View File
@@ -123,15 +123,15 @@ def pass_gen(): # prompts the user for necessary information to generate a pass
return _gen
if _length > 800:
_length = 800
print('\n\u001b[38;5;9mpassword length has been limited to the maximum of 840 characters\u001b[0m\n')
print('\n\u001b[38;5;9mpassword length has been limited to the maximum of 800 characters\u001b[0m\n')
_complexity = str(input('password complexity - simple (for compatibility) or complex (for security)? (s/C) '))
_gen = string_gen(_complexity.lower(), _length)
return _gen
def shm_gen(_tmp_dir=path.expanduser('~/.config/sshyp/tmp/')): # creates a temporary directory for entry editing
_shm_folder_gen = string_gen('c', randint(12, 48))
_shm_entry_gen = string_gen('c', randint(12, 48))
_shm_folder_gen = string_gen('s', randint(12, 48))
_shm_entry_gen = string_gen('s', randint(12, 48))
Path(_tmp_dir + _shm_folder_gen).mkdir(0o700)
return _shm_folder_gen, _shm_entry_gen
@@ -762,7 +762,7 @@ if __name__ == "__main__":
sshyp_data = open(path.expanduser('~/.config/sshyp/sshyp-data')).readlines()
device_type = sshyp_data[0].rstrip()
if device_type == 'client':
directory = path.expanduser('~/.local/share/sshyp')
directory = path.expanduser('~/.local/share/sshyp/')
gpg_id = sshyp_data[1].rstrip()
editor = sshyp_data[2].rstrip()
quick_unlock_status = sshyp_data[3].rstrip()