From da3cd453e23a27b5a1ded7aad6dde8e218003349 Mon Sep 17 00:00:00 2001 From: Georges-Antoine Assi Date: Sun, 5 Apr 2026 22:41:34 -0400 Subject: [PATCH] thing --- backend/handler/sync/ssh_handler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/handler/sync/ssh_handler.py b/backend/handler/sync/ssh_handler.py index 6f644eab1..c00ce7cca 100644 --- a/backend/handler/sync/ssh_handler.py +++ b/backend/handler/sync/ssh_handler.py @@ -87,7 +87,7 @@ class SSHSyncHandler: port = sync_config.get("ssh_port", 22) username = sync_config.get("ssh_username", "root") - if not os.path.isfile(SYNC_SSH_KNOWN_HOSTS_PATH): + if not Path(SYNC_SSH_KNOWN_HOSTS_PATH).is_file(): raise FileNotFoundError( f"SSH known_hosts file not found at {SYNC_SSH_KNOWN_HOSTS_PATH}. " "Mount a known_hosts file or set SYNC_SSH_KNOWN_HOSTS_PATH." @@ -203,7 +203,7 @@ class SSHSyncHandler: """Upload a save file to a remote device.""" async with conn.start_sftp_client() as sftp: # Ensure remote directory exists - remote_dir = os.path.dirname(remote_path) + remote_dir = str(Path(remote_path).parent) try: await sftp.mkdir(remote_dir) except asyncssh.SFTPError: