From 54ac89a85a1816838ba86b9211d9e28dfb2c62ec Mon Sep 17 00:00:00 2001 From: loathingKernel <142770+loathingKernel@users.noreply.github.com> Date: Sat, 16 Dec 2023 15:36:38 +0200 Subject: [PATCH] Lgndr: Validate default platform if it is coming from the config --- rare/lgndr/core.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rare/lgndr/core.py b/rare/lgndr/core.py index 68ce36de..c5954af3 100644 --- a/rare/lgndr/core.py +++ b/rare/lgndr/core.py @@ -55,7 +55,8 @@ class LegendaryCore(LegendaryCoreReal): @property def default_platform(self) -> str: os_default = "Mac" if sys_platform == "darwin" else "Windows" - return self.lgd.config.get("Legendary", "default_platform", fallback=os_default) + usr_platform = self.lgd.config.get("Legendary", "default_platform", fallback=os_default) + return usr_platform if usr_platform in ("Windows", "Win32", "Mac") else os_default # skip_sync defaults to false but since Rare is persistent, skip by default # def get_installed_game(self, app_name, skip_sync=True) -> InstalledGame: