diff --git a/bin/sshyp b/bin/sshyp index 7455d3c..f02a825 100755 --- a/bin/sshyp +++ b/bin/sshyp @@ -107,6 +107,8 @@ def tweak(): # runs configuration wizard path.expanduser('~/.ssh/sshyp'), _ip, _port, _username_ssh) # device name configuration + for _name in listdir(path.expanduser('~/.config/sshyp/devices')): # remove existing device name + remove(f"{path.expanduser('~/.config/sshyp/devices/')}{_name}") print('\nIMPORTANT: This name MUST be unique amongst your client devices. ' '\nThis is used to keep track of which devices have up-to-date databases.\n') _client_device_name = str(input('What would you like to name this device? ')) @@ -243,7 +245,7 @@ def sync(): # calls sshync to sync changes to the user's server _folder_database = None s_exit() for _folder in _folder_database: - if Path(f"{path.expanduser('~/.password-pasture/')}{_folder[:-1]}").exists(): + if Path(f"{path.expanduser('~/.password-pasture/')}{_folder[:-1]}").is_dir(): pass else: Path(f"{path.expanduser('~/.password-pasture/')}{_folder[:-1]}").mkdir(0o700, parents=True, exist_ok=True)