mirror of
https://github.com/rwinkhart/sshyp.git
synced 2026-08-28 12:56:28 -04:00
Actually fixed local folder deletion this time
This commit is contained in:
@@ -221,7 +221,7 @@ def sync(): # calls sshync to sync changes to the user's server
|
||||
_deletion_database = None
|
||||
s_exit()
|
||||
for _file in _deletion_database:
|
||||
if _file.endswith('/'):
|
||||
if _file[:-1].endswith('/'):
|
||||
try:
|
||||
rmtree(f"{path.expanduser('~/.password-pasture/')}{_file[:-1]}")
|
||||
except FileNotFoundError:
|
||||
@@ -229,7 +229,7 @@ def sync(): # calls sshync to sync changes to the user's server
|
||||
else:
|
||||
try:
|
||||
remove(f"{path.expanduser('~/.password-pasture/')}{_file[:-1]}")
|
||||
except FileNotFoundError:
|
||||
except (FileNotFoundError, IsADirectoryError):
|
||||
print('File does not exist locally.\n')
|
||||
# set permissions before uploading
|
||||
system('find ' + directory + ' -type d -exec chmod -R 700 {} +')
|
||||
|
||||
Reference in New Issue
Block a user