m
This commit is contained in:
@@ -354,19 +354,6 @@ def reload_config(
|
||||
return load_config(config_dir=config_dir, filename=filename)
|
||||
|
||||
|
||||
def _validate_config_safety(config: Dict[str, Any]) -> None:
|
||||
"""Validate configuration safety.
|
||||
|
||||
Folder store validation has been removed because the folder store backend
|
||||
is no longer supported.
|
||||
"""
|
||||
return
|
||||
|
||||
|
||||
def _serialize_conf(config: Dict[str, Any]) -> str:
|
||||
"""Serialize configuration to a string for legacy .conf files."""
|
||||
return json.dumps(config, indent=4)
|
||||
|
||||
|
||||
def save_config(
|
||||
config: Dict[str, Any],
|
||||
@@ -405,16 +392,6 @@ def save_config(
|
||||
except Exception as e:
|
||||
log(f"Failed to save config to database: {e}")
|
||||
|
||||
# 2. Legacy fallback: write to .conf for now (optional, but keep for backward compat for a bit)
|
||||
if config_path.suffix.lower() == ".conf":
|
||||
# Safety Check: placeholder (folder store validation removed)
|
||||
_validate_config_safety(config)
|
||||
|
||||
try:
|
||||
config_path.write_text(_serialize_conf(config), encoding="utf-8")
|
||||
except OSError as exc:
|
||||
log(f"Failed to write legacy config to {config_path}: {exc}")
|
||||
|
||||
cache_key = _make_cache_key(config_dir, filename, config_path)
|
||||
_CONFIG_CACHE[cache_key] = config
|
||||
|
||||
|
||||
Reference in New Issue
Block a user