From d5ec14b556734668fd76129198a79a62a32eacff Mon Sep 17 00:00:00 2001 From: derrod Date: Thu, 21 Oct 2021 12:15:44 +0200 Subject: [PATCH] [core] Fix resolving "{AppData}" in save path Why did they decide that {AppData} should match to %LOCALAPPDATA%? --- legendary/core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/legendary/core.py b/legendary/core.py index 92b5214..be998de 100644 --- a/legendary/core.py +++ b/legendary/core.py @@ -664,7 +664,7 @@ class LegendaryCore: if os.name == 'nt': path_vars.update({ - '{appdata}': os.path.expandvars('%APPDATA%'), + '{appdata}': os.path.expandvars('%LOCALAPPDATA%'), '{userdir}': os.path.expandvars('%userprofile%/documents'), # '{userprofile}': os.path.expandvars('%userprofile%'), # possibly wrong '{usersavedgames}': os.path.expandvars('%userprofile%/Saved Games') @@ -686,7 +686,7 @@ class LegendaryCore: wine_reg = read_registry(wine_pfx) wine_folders = get_shell_folders(wine_reg, wine_pfx) # path_vars['{userprofile}'] = user_path - path_vars['{appdata}'] = wine_folders['AppData'] + path_vars['{appdata}'] = wine_folders['Local AppData'] # this maps to ~/Documents, but the name is locale-dependent so just resolve the symlink from WINE path_vars['{userdir}'] = os.path.realpath(wine_folders['Personal']) path_vars['{usersavedgames}'] = wine_folders['{4C5C32FF-BB9D-43B0-B5B4-2D72E54EAAA4}']