fix: validate custom folders before launch

This commit is contained in:
aclist committed 2026-06-17 22:12:12 +09:00
1 parent 668ec1d7a0
commit 1fe66076c6
3 files changed
+38 -1

No files matched your search

+9 -1
View File
@@ -34,10 +34,18 @@ class OfflineManager:
self.thread_man = ThreadingManager(controller)
self.appid: int
self.mission_folder: str
self.local_mods: list[str] | None
self.custom_mods: list[str] | None
# TODO; more robust test
def is_custom_folder_valid(self, folder: str) -> bool:
return Path(folder).exists()
# TODO: set properties as members of offline manager on demand and check them here
# rather than passing strings again
def is_mission_valid(self, folder: str) -> bool:
return is_mission(Path(folder))
def get_mission(self) -> None:
folder = self.open_folderpicker(dialogs.mission_dialog)
if folder is None: