Paths updated
This commit is contained in:
parent
d844d182f6
commit
29d84082f1
@ -234,13 +234,14 @@ class ToplevelWelcome(ThemedToplevel):
|
|||||||
|
|
||||||
def stage_location_select_location(self, entry: ttk.Entry):
|
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")
|
self.path_dir = filedialog.askdirectory(initialdir=self.path_start, title="Select Stardew Valley Saves folder")
|
||||||
|
|
||||||
if self.path_dir != "":
|
if self.path_dir != "":
|
||||||
|
Loading…
Reference in New Issue
Block a user