mirror of
https://github.com/SteamDeckHomebrew/decky-loader.git
synced 2026-06-17 00:37:49 +00:00
Ignore chmod if decky is not run as root (#510)
* Ignore chmod if decky is not run as root * I can't read * i managed to make a mistake on 2/3 lines i edited.... * add warning on startup * logger.warn is depreciated * Update localplatformlinux.py
This commit is contained in:
@@ -60,6 +60,8 @@ def chown(path : str, user : UserType = UserType.HOST_USER, recursive : bool =
|
||||
return result == 0
|
||||
|
||||
def chmod(path : str, permissions : int, recursive : bool = True) -> bool:
|
||||
if _get_effective_user_id() != 0:
|
||||
return True
|
||||
result = call(["chmod", "-R", str(permissions), path] if recursive else ["chmod", str(permissions), path])
|
||||
return result == 0
|
||||
|
||||
@@ -191,4 +193,4 @@ def get_unprivileged_user() -> str:
|
||||
logger.warn("Unprivileged user is not properly configured. Defaulting to 'deck'")
|
||||
user = 'deck'
|
||||
|
||||
return user
|
||||
return user
|
||||
|
||||
Reference in New Issue
Block a user