mirror of
https://github.com/rwinkhart/sshyp.git
synced 2026-09-03 07:37:16 -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
|
_folder_database = None
|
||||||
s_exit()
|
s_exit()
|
||||||
for _folder in _folder_database:
|
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
|
pass
|
||||||
else:
|
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
|
# set permissions before uploading
|
||||||
system('find ' + directory + ' -type d -exec chmod -R 700 {} +')
|
system('find ' + directory + ' -type d -exec chmod -R 700 {} +')
|
||||||
system('find ' + directory + ' -type f -exec chmod -R 600 {} +')
|
system('find ' + directory + ' -type f -exec chmod -R 600 {} +')
|
||||||
|
|||||||
Reference in New Issue
Block a user