mirror of
https://github.com/rwinkhart/sshyp.git
synced 2026-09-05 16:47:14 -04:00
Fixed shearing and renaming entries with quick-unlock
Former-commit-id: f2e3558a0f923d0b5082987858d0e0e59f820f7d [formerly 07cf7a558f]
Former-commit-id: f5036da37b69cb339aba710aa53c9bbf9853567a
This commit is contained in:
+3
-3
@@ -147,7 +147,7 @@ def decrypt(_entry_dir, _shm_folder, _shm_entry, _gpg_com, _tmp_dir=path.expandu
|
|||||||
# decrypts an entry to a temporary directory
|
# decrypts an entry to a temporary directory
|
||||||
if _shm_folder == 0 and _shm_entry == 0:
|
if _shm_folder == 0 and _shm_entry == 0:
|
||||||
if quick_unlock_enabled == 'y':
|
if quick_unlock_enabled == 'y':
|
||||||
_command = f"gpg --pinentry-mode loopback --passphrase {whitelist_verify()} -qd --output /dev/null " \
|
_command = f"gpg --pinentry-mode loopback --passphrase '{whitelist_verify()}' -qd --output /dev/null " \
|
||||||
f"{path.expanduser('~/.config/sshyp/lock.gpg')}"
|
f"{path.expanduser('~/.config/sshyp/lock.gpg')}"
|
||||||
else:
|
else:
|
||||||
_command = f"{_gpg_com} -qd --output /dev/null {path.expanduser('~/.config/sshyp/lock.gpg')}"
|
_command = f"{_gpg_com} -qd --output /dev/null {path.expanduser('~/.config/sshyp/lock.gpg')}"
|
||||||
@@ -678,7 +678,7 @@ def rename(): # renames an entry or folder
|
|||||||
move(f"{directory}{_entry_name}.gpg", f"{directory}{_new_name}.gpg")
|
move(f"{directory}{_entry_name}.gpg", f"{directory}{_new_name}.gpg")
|
||||||
if ssh_error != 1:
|
if ssh_error != 1:
|
||||||
system(f"ssh -i '{path.expanduser('~/.ssh/sshyp')}' -p {port} {username_ssh}@{ip} \"cd /lib/sshyp; python -c "
|
system(f"ssh -i '{path.expanduser('~/.ssh/sshyp')}' -p {port} {username_ssh}@{ip} \"cd /lib/sshyp; python -c "
|
||||||
f"'import sshypRemote; sshypRemote.delete(\"'\"{_entry_name}\"'\", 'remotely')'\"")
|
f"'import sshypRemote; sshypRemote.delete(\"'\"{_entry_name}\"'\", \"'\"remotely\"'\")'\"")
|
||||||
|
|
||||||
|
|
||||||
def edit(): # edits the contents of an entry
|
def edit(): # edits the contents of an entry
|
||||||
@@ -811,7 +811,7 @@ def remove_data(): # deletes an entry from the server and flags it for local de
|
|||||||
decrypt(path.expanduser('~/.config/sshyp/lock.gpg'), 0, 0, gpg)
|
decrypt(path.expanduser('~/.config/sshyp/lock.gpg'), 0, 0, gpg)
|
||||||
if ssh_error != 1:
|
if ssh_error != 1:
|
||||||
system(f"ssh -i '{path.expanduser('~/.ssh/sshyp')}' -p {port} {username_ssh}@{ip} \"cd /lib/sshyp; python -c "
|
system(f"ssh -i '{path.expanduser('~/.ssh/sshyp')}' -p {port} {username_ssh}@{ip} \"cd /lib/sshyp; python -c "
|
||||||
f"'import sshypRemote; sshypRemote.delete(\"'\"{_entry_name}\"'\", 'remotely')'\"")
|
f"'import sshypRemote; sshypRemote.delete(\"'\"{_entry_name}\"'\", \"'\"remotely\"'\")'\"")
|
||||||
else:
|
else:
|
||||||
from sshypRemote import delete as offline_delete
|
from sshypRemote import delete as offline_delete
|
||||||
offline_delete(_entry_name, '')
|
offline_delete(_entry_name, '')
|
||||||
|
|||||||
Reference in New Issue
Block a user