From 894f406fd2579c57d9380b9f7efef42cc0eefe91 Mon Sep 17 00:00:00 2001 From: Cuan Date: Wed, 16 Feb 2022 15:57:23 -0500 Subject: [PATCH] Fix recursive folder syncing reporting incorrect directories --- bin/sshyp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/sshyp b/bin/sshyp index ed384ea..3cf06fe 100755 --- a/bin/sshyp +++ b/bin/sshyp @@ -245,10 +245,10 @@ 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]}").is_dir(): + if Path(f"{path.expanduser('~')}{_folder[:-1]}").is_dir(): pass else: - Path(f"{path.expanduser('~/.password-pasture/')}{_folder[:-1]}").mkdir(0o700, parents=True, exist_ok=True) + Path(f"{path.expanduser('~')}{_folder[:-1]}").mkdir(0o700, parents=True, exist_ok=True) # set permissions before uploading system('find ' + directory + ' -type d -exec chmod -R 700 {} +') system('find ' + directory + ' -type f -exec chmod -R 600 {} +')