change: remove Flatpak option if binary is not installed

This commit is contained in:
aclist committed 2026-10-23 12:20:10 +09:00
1 parent c2993ad289
commit d577ba0970
1 file changed
+4
+4
View File
@@ -13,6 +13,7 @@ from warnings import deprecated
from dzgui.api.acf import ACF
from dzgui.init.prereqs import has_any_client
from dzgui.init.proc import has_cmd
from dzgui.const.constants import (
APPID_DAYZ,
APPID_DAYZ_EXP,
@@ -22,6 +23,7 @@ from dzgui.const.constants import (
DEBIAN_STEAM_PATH,
DEFAULT_STEAM_PATH,
DOWNLOADS_PATH,
FLATPAK_CMD,
FLATPAK_STEAM_PATH,
LIBRARYFOLDERS_PATH,
UBUNTU_STEAM_PATH,
@@ -82,6 +84,8 @@ def get_steam_paths() -> list[tuple[Path, str]]:
}
for path in DEFAULT_PATH, FLATPAK_PATH, UBUNTU_PATH, DEBIAN_PATH:
if path is FLATPAK_PATH and has_cmd(FLATPAK_CMD) is False:
continue
if path.joinpath(VDF_PATH).is_file():
paths.append((path, human[path]))
return paths