mirror of
https://github.com/rwinkhart/sshyp.git
synced 2026-08-28 12:56:28 -04:00
Fix recursive folder syncing reporting incorrect directories
This commit is contained in:
@@ -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 {} +')
|
||||
|
||||
Reference in New Issue
Block a user