Skip to content

Commit

Permalink
backend: remove hardcoded paths
Browse files Browse the repository at this point in the history
  • Loading branch information
xTVaser committed Jun 3, 2024
1 parent 0d0abc9 commit ce0e389
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ async def read_hero_image_as_base64(self, game):

async def is_game_installed(self, game):
try:
game_dir = os.path.join("/home/deck/OpenGOAL/games", game)
game_dir = os.path.join("{}/OpenGOAL/games".format(decky_plugin.DECKY_USER_HOME), game)
if os.path.exists(game_dir) and len(os.listdir(game_dir)) > 0:
return True
return False
Expand Down Expand Up @@ -508,7 +508,7 @@ async def is_game_out_of_date(self, game):

async def does_iso_exist_for_installation(self, game):
try:
iso_path = os.path.join("/home/deck/OpenGOAL/isos", "{}.iso".format(game))
iso_path = os.path.join("{}/OpenGOAL/isos".format(decky_plugin.DECKY_USER_HOME), "{}.iso".format(game))
if os.path.exists(iso_path):
return True
return False
Expand Down

0 comments on commit ce0e389

Please sign in to comment.