Skip to content

Commit

Permalink
fix:icon file path
Browse files Browse the repository at this point in the history
use self.res_dir not self.root_dir to allow non standard locations (eg. OCP)

allow skills to load even if icon is missing, but log an error and dont register app with homescreen
  • Loading branch information
JarbasAl committed Nov 15, 2024
1 parent b550935 commit 7dcc59b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ovos_workshop/skills/ovos.py
Original file line number Diff line number Diff line change
Expand Up @@ -930,7 +930,10 @@ def register_homescreen_app(self, icon: str, name: str, event: str):
# it is the only path assured to be accessible both by skills and GUI
GUI_CACHE_PATH = get_xdg_cache_save_path('ovos_gui')

full_icon_path = f"{self.root_dir}/gui/{icon}"
full_icon_path = f"{self.res_dir}/gui/{icon}"
if not os.path.isfile(full_icon_path):
self.log.error(f"failed to register homescreen app, icon does not exist: {full_icon_path}")
return
shared_path = f"{GUI_CACHE_PATH}/{self.skill_id}/{icon}"
shutil.copy(full_icon_path, shared_path)

Expand Down

0 comments on commit 7dcc59b

Please sign in to comment.