mirror of
https://github.com/tcsenpai/UWINE.git
synced 2025-06-06 11:35:20 +00:00
fix issue where defined but non-existent WINEPREFIX was ignored and therefore not created
This commit is contained in:
parent
429de35ee3
commit
a610be41d8
@ -128,14 +128,16 @@ def check_env(
|
||||
"WINEPREFIX" not in os.environ
|
||||
or not Path(os.environ["WINEPREFIX"]).expanduser().is_dir()
|
||||
):
|
||||
if "WINEPREFIX" not in os.environ:
|
||||
# Automatically create a prefix for the user if WINEPREFIX is not set
|
||||
# The GAMEID will be the name of the dir
|
||||
pfx: Path = Path.home().joinpath("Games/ULWGL/" + env["GAMEID"])
|
||||
else:
|
||||
pfx: Path = Path(os.environ["WINEPREFIX"])
|
||||
|
||||
pfx.mkdir(parents=True, exist_ok=True)
|
||||
os.environ["WINEPREFIX"] = pfx.as_posix()
|
||||
env["WINEPREFIX"] = os.environ["WINEPREFIX"]
|
||||
else:
|
||||
|
||||
env["WINEPREFIX"] = os.environ["WINEPREFIX"]
|
||||
|
||||
if "PROTONPATH" not in os.environ:
|
||||
|
Loading…
x
Reference in New Issue
Block a user