Paths updated

This commit is contained in:
Profitroll 2023-01-27 12:17:33 +01:00
parent d844d182f6
commit 29d84082f1
1 changed files with 7 additions and 6 deletions

View File

@ -234,12 +234,13 @@ class ToplevelWelcome(ThemedToplevel):
def stage_location_select_location(self, entry: ttk.Entry):
if path.exists(path.join(str(getenv("APPDATA")), "Stardew Valley")):
self.path_start = path.join(str(getenv("APPDATA")), "Stardew Valley")
elif path.exists(path.join(path.expanduser("~"), ".config", "Stardew Valley")):
self.path_start = path.join(path.expanduser("~"), ".config", "Stardew Valley")
else:
self.path_start = None
self.path_start = None
for guess in [ [str(getenv("APPDATA")), "Stardew Valley"], [str(getenv("APPDATA")), "StardewValley"], [path.expanduser("~"), ".config", "Stardew Valley"], [path.expanduser("~"), ".config", "StardewValley"] ]:
joined_path = path.join(*guess)
if path.exists(joined_path):
self.path_start = joined_path
break
self.path_dir = filedialog.askdirectory(initialdir=self.path_start, title="Select Stardew Valley Saves folder")