diff --git a/Utils.py b/Utils.py index f2038905..84d3a33d 100644 --- a/Utils.py +++ b/Utils.py @@ -166,6 +166,10 @@ def home_path(*path: str) -> str: os.symlink(home_path.cached_path, legacy_home_path) else: os.makedirs(home_path.cached_path, 0o700, exist_ok=True) + elif sys.platform == 'darwin': + import platformdirs + home_path.cached_path = platformdirs.user_data_dir("Archipelago", False) + os.makedirs(home_path.cached_path, 0o700, exist_ok=True) else: # not implemented home_path.cached_path = local_path() # this will generate the same exceptions we got previously @@ -177,7 +181,7 @@ def user_path(*path: str) -> str: """Returns either local_path or home_path based on write permissions.""" if hasattr(user_path, "cached_path"): pass - elif os.access(local_path(), os.W_OK): + elif os.access(local_path(), os.W_OK) and not (is_macos and is_frozen()): user_path.cached_path = local_path() else: user_path.cached_path = home_path()