Skip to content

Commit

Permalink
fix: ensure state directories exist when running without the installer
Browse files Browse the repository at this point in the history
  • Loading branch information
K900 committed Sep 2, 2023
1 parent 27cbf38 commit bd72219
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions decky_loader/localplatformlinux.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ def get_privileged_path() -> str:
if path == None:
path = get_unprivileged_path()

os.makedirs(path, exist_ok=True)

return path

def _parent_dir(path : str) -> str:
Expand Down Expand Up @@ -180,6 +182,8 @@ def get_unprivileged_path() -> str:
logger.warn("Unprivileged path is not properly configured. Defaulting to /home/deck/homebrew")
path = "/home/deck/homebrew" # We give up

os.makedirs(path, exist_ok=True)

return path


Expand Down
2 changes: 2 additions & 0 deletions decky_loader/localplatformwin.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ def get_unprivileged_path() -> str:
if path == None:
path = os.getenv("PRIVILEGED_PATH", os.path.join(os.path.expanduser("~"), "homebrew"))

os.makedirs(path, exist_ok=True)

return path

def get_unprivileged_user() -> str:
Expand Down

0 comments on commit bd72219

Please sign in to comment.