Give conf writes a backup, a lock and a read-back before they count

These files are gitignored, so a bad write had nothing to go back to; the escaping order
also stored any value containing a quote truncated but still parseable, which only a
read-back can catch.
This commit is contained in:
Gmer4Lfe
2026-08-09 19:07:22 -04:00
parent eb4512aee3
commit d9f917ecef
5 changed files with 335 additions and 15 deletions
+2
View File
@@ -117,6 +117,8 @@ define('STATE_DIR', DATA_DIR . '/state');
define('AI_DATA_DIR', DATA_DIR . '/ai');
define('CACHE_BACKUP_DIR', DATA_DIR . '/cache');
define('LOG_ARCHIVE_DIR', DATA_DIR . '/logs');
define('BACKUP_DIR', DATA_DIR . '/Backups');
define('CONF_BACKUP_DIR', BACKUP_DIR . '/Confs');
define('LOG_DIR', '/var/log/varaverk');
// User-authored custom scripts (scheduler page "+ Create Script") — kept outside the git
// repo entirely, alongside the User Scripts plugin's own storage. Any *.sh file placed