From 90359b62e60c894ed8a6206cbe73121a9f4a7294 Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Sun, 12 Apr 2020 04:38:57 +0200 Subject: [PATCH] fix qusb2snes launch pathing --- MultiClient.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/MultiClient.py b/MultiClient.py index a18e7fc4..4d3cee04 100644 --- a/MultiClient.py +++ b/MultiClient.py @@ -347,15 +347,19 @@ async def snes_connect(ctx : Context, address): seen_problems.add(problem) logging.error(f"Error connecting to QUsb2snes ({problem})") if len(seen_problems) == 1: - #this is the first problem. Let's try launching QUsb2snes if it isn't already running + # this is the first problem. Let's try launching QUsb2snes if it isn't already running qusb2snes_path = Utils.get_options()["general_options"]["qusb2snes"] import os if os.path.isfile(qusb2snes_path): logging.info(f"Attempting to start {qusb2snes_path}") + else: + qusb2snes_path = Utils.local_path(qusb2snes_path) + if os.path.isfile(qusb2snes_path): import subprocess subprocess.Popen(qusb2snes_path, cwd=os.path.dirname(qusb2snes_path)) else: - logging.info(f"Attempt to start (Q)Usb2Snes was aborted as path {qusb2snes_path} was not found, please start it yourself if it is not running") + logging.info( + f"Attempt to start (Q)Usb2Snes was aborted as path {qusb2snes_path} was not found, please start it yourself if it is not running") await asyncio.sleep(1) else: