mirror of
https://github.com/ModOrganizer2/modorganizer-basic_games.git
synced 2026-07-27 14:07:29 -07:00
Fix getSteamPath not returning Steam Directory
This commit is contained in:
+3
-3
@@ -105,7 +105,7 @@ def getSteamPath() -> str:
|
||||
try:
|
||||
with winreg.OpenKey(winreg.HKEY_CURRENT_USER, "Software\\Valve\\Steam") as key:
|
||||
value = winreg.QueryValueEx(key, "SteamExe")
|
||||
return value[0].replace("/", "\\")
|
||||
return os.path.dirname(value[0].replace("/", "\\"))
|
||||
except FileNotFoundError:
|
||||
return ""
|
||||
|
||||
@@ -116,12 +116,12 @@ def find_games() -> Dict[str, Path]:
|
||||
return {}
|
||||
|
||||
library_vdf_path = os.path.join(
|
||||
os.path.dirname(steam_path), "steamapps", "libraryfolders.vdf"
|
||||
steam_path, "steamapps", "libraryfolders.vdf"
|
||||
)
|
||||
|
||||
try:
|
||||
library_folders = parse_library_info(library_vdf_path)
|
||||
library_folders.append(LibraryFolder(os.path.dirname(steam_path)))
|
||||
library_folders.append(LibraryFolder(steam_path))
|
||||
except FileNotFoundError:
|
||||
return {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user