From 769a8d9aab52ed29156758c0e0e2592cea3238c3 Mon Sep 17 00:00:00 2001 From: mirkobrombin Date: Mon, 9 May 2022 22:48:33 +0200 Subject: [PATCH] fix #1445 --- src/backend/wine/executor.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/backend/wine/executor.py b/src/backend/wine/executor.py index 363cd3ee94..5bcdd7f6d3 100644 --- a/src/backend/wine/executor.py +++ b/src/backend/wine/executor.py @@ -55,10 +55,12 @@ def __get_cwd(self, cwd: str) -> Union[str, None]: if cwd in [None, ""]: path = self.exec_path if winepath.is_windows(self.exec_path): - if path.startswith(("'", '"')): - path = path[1:-1] path = "\\".join(path.split("\\")[:-1]) path = winepath.to_unix(path) + if path.startswith(("'", '"')): + path = path[1:] + if path.endswith(("'", '"')): + path = path[:-1] return os.path.dirname(path) return cwd # will be set by WineCommand if None