mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2026-10-25 01:06:05 +03:00
Merge branch 'main' into stable
This commit is contained in:
3 files changed
+27
-3
No files matched your search
@@ -2,6 +2,13 @@ This is the master changelog for Elite Dangerous Market Connector. Entries are
|
||||
---
|
||||
* We currently test against, and package with, Python 3.13, 64-bit.
|
||||
---
|
||||
Release 6.0.2
|
||||
===
|
||||
This release adds additional safety checks for the writing of the new config file on first write for Windows installs.
|
||||
|
||||
**Bug Fixes**
|
||||
* Fixes a bug where the new config.toml file could be improperly written with all null content.
|
||||
|
||||
Release 6.0.1
|
||||
===
|
||||
This release fixes a bug with 6.0.0 for Caspian Explorer pilots due to a typo and clarifies the license in use with EDMC.
|
||||
|
||||
+1
-1
@@ -54,7 +54,7 @@ appcmdname = "EDMC"
|
||||
# <https://semver.org/#semantic-versioning-specification-semver>
|
||||
# Major.Minor.Patch(-prerelease)(+buildmetadata)
|
||||
# NB: Do *not* import this, use the functions appversion() and appversion_nobuild()
|
||||
_static_appversion = "6.0.1"
|
||||
_static_appversion = "6.0.2"
|
||||
_cached_version: semantic_version.Version | None = None
|
||||
copyright = "© 2015-2019 Jonathan Harris, 2020-2025 EDCD"
|
||||
|
||||
|
||||
+19
-2
@@ -9,6 +9,7 @@ from __future__ import annotations
|
||||
|
||||
import pathlib
|
||||
import sys
|
||||
import os
|
||||
import uuid
|
||||
import winreg
|
||||
import datetime
|
||||
@@ -88,9 +89,25 @@ class WinConfigMinimal:
|
||||
|
||||
path_obj = pathlib.Path(toml_path)
|
||||
path_obj.parent.mkdir(parents=True, exist_ok=True)
|
||||
tmp_path = path_obj.with_suffix(path_obj.suffix + ".tmp")
|
||||
config_logger.debug("Writing Config File")
|
||||
with path_obj.open("wb") as f:
|
||||
tomli_w.dump(config_data, f)
|
||||
try:
|
||||
# Validate serialization BEFORE touching the real file
|
||||
tomli_w.dumps(config_data)
|
||||
with tmp_path.open("wb") as f:
|
||||
tomli_w.dump(config_data, f)
|
||||
f.flush()
|
||||
os.fsync(f.fileno())
|
||||
tmp_path.replace(path_obj)
|
||||
except Exception:
|
||||
config_logger.exception("Failed to write TOML config file")
|
||||
# Ensure temp file doesn't linger
|
||||
try:
|
||||
if tmp_path.exists():
|
||||
tmp_path.unlink()
|
||||
except Exception:
|
||||
pass
|
||||
raise
|
||||
|
||||
def close(self):
|
||||
"""Close registry handle."""
|
||||
|
||||
Reference in new issue
Block a user