fix: guard atomic writers after profile deletion
This commit is contained in:
@@ -103,8 +103,9 @@ def _write_json_cache(path: Path, data: Any, **dump_kwargs: Any) -> None:
|
||||
"""Atomically persist a cache file (creating parents). Raises on failure — callers decide
|
||||
whether a failed cache write is worth logging."""
|
||||
from utils import atomic_json_write
|
||||
from hermes_constants import mkdir_under_hermes_home
|
||||
|
||||
path.parent.mkdir(parents=True, exist_ok=True)
|
||||
mkdir_under_hermes_home(path.parent)
|
||||
atomic_json_write(path, data, **dump_kwargs)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user