feat: separate writable data dir from program dir (LAN update groundwork)
- add get_data_dir() with CMBOT_DATA_DIR override, fallback to program dir - point config/logs/output at the data root; resources stay on program root - harden config/template writes with parents=True for a deep data root - add docs/10-lan-update.md (LAN auto-update design); default install root %LOCALAPPDATA%\CMBot for elevation-free self-update Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -77,7 +77,7 @@ def _save_custom_templates(templates: List[Template]):
|
||||
"""Write custom templates to JSON. Logs error on failure, does not raise."""
|
||||
path = _templates_file()
|
||||
try:
|
||||
path.parent.mkdir(exist_ok=True)
|
||||
path.parent.mkdir(parents=True, exist_ok=True)
|
||||
payload = {
|
||||
"templates": [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user