mirror of
https://github.com/aclist/dztui.git
synced 2026-10-30 22:52:42 +01:00
fix: validate custom folders before launch
This commit is contained in:
1 parent
668ec1d7a0
commit
1fe66076c6
3 files changed
+38
-1
No files matched your search
@@ -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:
|
||||
|
||||
Reference in new issue
Block a user