mirror of
https://github.com/lutris/lutris
synced 2024-09-04 23:13:35 +00:00
Adapt user_data_dir when executed in a Flatpak
This commit is contained in:
parent
132dfdb805
commit
0531e7f9c6
|
@ -101,7 +101,8 @@ def create_launcher(game_slug, game_id, game_name, launch_config_name=None, desk
|
|||
logger.debug("Creating Desktop icon in %s", launcher_path)
|
||||
shutil.copy(tmp_launcher_path, launcher_path)
|
||||
if menu:
|
||||
menu_path = os.path.join(GLib.get_user_data_dir(), "applications")
|
||||
user_dir = os.path.expanduser("~/.local/share") if LINUX_SYSTEM.is_flatpak else GLib.get_user_data_dir()
|
||||
menu_path = os.path.join(user_dir, "applications")
|
||||
os.makedirs(menu_path, exist_ok=True)
|
||||
launcher_path = os.path.join(menu_path, launcher_filename)
|
||||
logger.debug("Creating menu launcher in %s", launcher_path)
|
||||
|
|
Loading…
Reference in a new issue