From 45605bf7bcd734d35b88f2e4517c36c2178fb3f3 Mon Sep 17 00:00:00 2001 From: Randall Winkhart Date: Mon, 10 Oct 2022 18:20:43 -0400 Subject: [PATCH] Fixed folder creation in offline mode --- lib/sshyp.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/sshyp.py b/lib/sshyp.py index f9b7f3b..bf2a3a0 100755 --- a/lib/sshyp.py +++ b/lib/sshyp.py @@ -585,8 +585,9 @@ def add_folder(): # creates a new folder else: _entry_name = entry_name_fetch(2) Path(directory + _entry_name).mkdir(0o700) - system(f"ssh -i '{path.expanduser('~/.ssh/sshyp')}' -p {port} {username_ssh}@{ip} \"mkdir -p '{directory_ssh}" - f"{_entry_name}'\"") + if ssh_error != 1: + system(f"ssh -i '{path.expanduser('~/.ssh/sshyp')}' -p {port} {username_ssh}@{ip} \"mkdir -p " + f"'{directory_ssh}{_entry_name}'\"") def rename(): # renames an entry or folder