fix: harden audit durability and fallback config writes

This commit is contained in:
Sucukdeluxe
2026-08-13 21:07:28 +02:00
parent 07c81c0123
commit 76ad81a0d3
4 changed files with 177 additions and 2 deletions
+13
View File
@@ -611,6 +611,19 @@ class ConfigStore {
});
}
saveFallbackLogPath(logFilePath) {
const snapshot = String(logFilePath || '').trim();
return this._enqueueWrite(() => {
const current = this.load();
current.globalSettings = {
...(current.globalSettings || {}),
logFilePath: snapshot
};
this._guardHosters(current, false);
return this._commit(current);
});
}
saveRendererGlobalSettings(globalSettings) {
const snapshot = this._clone(globalSettings || {});
return this._enqueueWrite(() => {