Skip to content

Commit

Permalink
Merge pull request #582 from LeXofLeviafan/fix-wineprefix-error-detec…
Browse files Browse the repository at this point in the history
…tion

fixed error detection & reporting on wineprefix creation failure
  • Loading branch information
sharkwouter authored Jan 5, 2024
2 parents ac6360f + b8f950a commit 3aae19d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
**1.2.6**
- Fix error detection & reporting on wineprefix creation failure

**1.2.5**
- Fix filtering for installed games

Expand Down
7 changes: 6 additions & 1 deletion minigalaxy/installer.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import sys
import os
import shutil
import subprocess
Expand Down Expand Up @@ -186,7 +187,11 @@ def extract_by_wine(game, installer, temp_dir):
if not os.path.exists(prefix_dir):
os.makedirs(prefix_dir, mode=0o755)
# Creating the prefix before modifying dosdevices
_exe_cmd(["env", "WINEPREFIX={}".format(prefix_dir), "wine", "start", "/B", "cmd", "/C", "exit"])
command = ["env", "WINEPREFIX={}".format(prefix_dir), "wine", "start", "/B", "cmd", "/C", "exit"]
stdout, stderr, exitcode = _exe_cmd(command)
if exitcode not in [0]:
print(stderr, file=sys.stderr)
return _("Wineprefix creation failed.")
if os.path.exists(drive):
os.unlink(drive)
os.symlink(temp_dir, drive)
Expand Down

0 comments on commit 3aae19d

Please sign in to comment.