Rename deletion check function

This commit is contained in:
2022-02-16 09:27:22 -05:00
parent eeabc18f18
commit 81c9b35c75
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -211,7 +211,7 @@ def sync(): # calls sshync to sync changes to the user's server
print('\nSyncing entries with the server device...\n')
# check for deletions
system(f"ssh -i '{path.expanduser('~/.ssh/sshyp')}' -p {port} {username_ssh}@{ip} \"python -c 'import sshyp-remote"
f"; shear.check(\"'\"{client_device_name}\"'\")'\"")
f"; shear.deletion_check(\"'\"{client_device_name}\"'\")'\"")
system(f"sftp -p -q -i '{path.expanduser('~/.ssh/sshyp')}' -P {port} {username_ssh}@{ip}:"
f"'/home/{username_ssh}/.config/sshyp/deletion_database' {path.expanduser('~/.config/sshyp/')}")
try:
+1 -1
View File
@@ -24,7 +24,7 @@ def delete(_file_path):
open(f"{expanduser('~/.config/sshyp/deleted/')}{_file_path.replace('/', '@')}^&*{_device_name}", 'w')
def check(_client_device_name):
def deletion_check(_client_device_name):
open(expanduser('~/.config/sshyp/deletion_database'), 'w').write('')
for _file in listdir(expanduser('~/.config/sshyp/deleted')):
_file_path = _file.replace('@', '/').split('^&*')[0]