diff --git a/README.md b/README.md index 37893e2..c3079a8 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ DZGUI follows a specific set of guidelines, enumerated below: - Provide a free and open-source tool under GPL - Do not use undocumented, third-party servers to aggregate data; no central "DZGUI" server - All connections go to Steam and DayZ servers directly; the tool should function in perpetuity without intermediary endpoints -- Target Linux desktop and Steam deck specifically; not a cross-platform tool +- Target Linux desktop and Steam Deck specifically; not a cross-platform tool ## Setup and usage diff --git a/dzgui/api/shortcuts.py b/dzgui/api/shortcuts.py index 2ecb076..11bd80d 100644 --- a/dzgui/api/shortcuts.py +++ b/dzgui/api/shortcuts.py @@ -173,11 +173,12 @@ class Shortcuts: self.save_shortcuts() def save_shortcuts(self) -> None: - try: - backup = self.shortcuts_path.with_suffix(".vdf.bak") - shutil.copy(self.shortcuts_path, backup) - except Exception as e: - logger.critical(e) + if self.shortcuts_path.is_file(): + try: + backup = self.shortcuts_path.with_suffix(".vdf.bak") + shutil.copy(self.shortcuts_path, backup) + except Exception as e: + logger.critical(e) try: with open(self.shortcuts_path, "wb") as f: vdf.binary_dump(self.shortcuts, f) diff --git a/dzgui/init/prereqs.py b/dzgui/init/prereqs.py index 5dce626..9266bfb 100644 --- a/dzgui/init/prereqs.py +++ b/dzgui/init/prereqs.py @@ -3,11 +3,14 @@ import shutil import subprocess from dzgui.const.constants import APP_NAME, FLATPAK_APPID, FLATPAK_CMD, STEAM_CMD +from dzgui.init.proc import is_sandboxed logger = logging.getLogger(APP_NAME) def has_flatpak_client() -> bool: + if is_sandboxed(): + return True try: res = subprocess.run( [FLATPAK_CMD, "list", "--columns=application"],