Compare commits

...
5 Commits
Author SHA1 Message Date
aclist a1f851430d Merge aa43b017d1 into e92df8c062 2026-07-09 03:37:28 +00:00
aclist aa43b017d1 chore: add note
Mirror to Codeberg / mirror-to-codeberg (push) Waiting to run
2026-07-09 12:37:23 +09:00
aclist fc86b75ca1 fix: convert str to Path 2026-07-09 12:37:09 +09:00
aclist e92df8c062 Merge pull request #398 from u-alexandru/fix/history-file-not-found
Mirror to Codeberg / mirror-to-codeberg (push) Has been cancelled
fix: prevent stuck launch dialog when history file is missing
2026-07-08 10:41:36 +09:00
u-alexandru 494311e8df fix: prevent stuck launch dialog when history file is missing
update_history_file() opened dzg.history in read mode without handling a
missing file. dzg.history is only created the first time it is written, so
on a fresh install the very first server connection raised FileNotFoundError
inside the post-launch cleanup callback:

  _destroy_on_idle -> _add_to_history_and_return -> update_history_file

The exception propagated out of the GLib idle callback before destroy_dialog()
ran, orphaning the "Waiting for DayZ to launch" modal so it could never be
closed from the UI and its Cancel button was unresponsive.

Treat a missing history file as an empty history so the first connection
records history normally instead of crashing the cleanup callback.
2026-07-07 18:45:22 +03:00
3 changed files with 7 additions and 3 deletions

No files matched your search

+1
View File
@@ -344,6 +344,7 @@ def get_app_allows_downloads(path: Path, appid: int) -> bool:
# NOTE: never allow
case 2:
return False
# NOTE: no other known values at this time
case _:
return True
+5 -2
View File
@@ -55,8 +55,11 @@ class ConfigManager:
self.update_config(Preferences.IP_LIST, ips)
def update_history_file(self, fqip: str) -> None:
with open(self.prefs.paths.history, "r") as f:
ips = [line.rstrip() for line in f.readlines()]
try:
with open(self.prefs.paths.history, "r") as f:
ips = [line.rstrip() for line in f.readlines()]
except FileNotFoundError:
ips = []
seen = set()
ips.append(fqip)
+1 -1
View File
@@ -60,7 +60,7 @@ class ModManager:
@call_on_thread(dialogs.fetching_mods)
def load_mods(self) -> None:
mods = get_delimited_mods(self.path)
mods = get_delimited_mods(Path(self.path))
if len(mods) < 1:
msg = self.format_mod_statusbar()
func = StoredFunc(lambda: self.emitter.emit("mods_updated", msg, 0))