proton: Make log directory configurable via PROTON_LOG_DIR

This commit is contained in:
Newbyte
2020-11-09 13:43:05 -06:00
committed by Andrew Eikum
parent 370dc01d07
commit 6305de83bc
3 changed files with 7 additions and 3 deletions
+3 -1
View File
@@ -703,7 +703,9 @@ class Session:
if "SteamGameId" in self.env:
if self.env["WINEDEBUG"] != "-all":
lfile_path = os.environ["HOME"] + "/steam-" + os.environ["SteamGameId"] + ".log"
basedir = self.env.get("PROTON_LOG_DIR", os.environ["HOME"])
makedirs(basedir)
lfile_path = basedir + "/steam-" + os.environ["SteamGameId"] + ".log"
if os.path.exists(lfile_path):
os.remove(lfile_path)
self.log_file = open(lfile_path, "w+")