From 8214d45620b6e4a171c196fa16e216630659fc84 Mon Sep 17 00:00:00 2001 From: Changhua Date: Mon, 17 Apr 2023 23:16:31 +0800 Subject: [PATCH] Fix path issue --- python/wcferry/client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/wcferry/client.py b/python/wcferry/client.py index 0e3ddd8..a53a211 100644 --- a/python/wcferry/client.py +++ b/python/wcferry/client.py @@ -100,7 +100,7 @@ class Wcf(): if host is None: self._local_host = True self.host = "127.0.0.1" - cmd = f"{WCF_ROOT}/wcf.exe start {self.port} {'debug' if debug else ''}" + cmd = fr'"{WCF_ROOT}\wcf.exe" start {self.port} {"debug" if debug else ""}' if os.system(cmd) != 0: self.LOG.error("初始化失败!") os._exit(-1) @@ -144,7 +144,7 @@ class Wcf(): self.cmd_socket.close() if self._local_host: - cmd = f"{WCF_ROOT}/wcf.exe stop" + cmd = fr'"{WCF_ROOT}\wcf.exe" stop' if os.system(cmd) != 0: self.LOG.error("退出失败!") return