Skip to content

Commit

Permalink
fix #1445
Browse files Browse the repository at this point in the history
  • Loading branch information
mirkobrombin committed May 9, 2022
1 parent 567ec32 commit 769a8d9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/backend/wine/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 769a8d9

Please sign in to comment.