mirror of
https://github.com/aclist/dztui.git
synced 2026-08-28 02:37:20 +02:00
fix: make parents if missing (#312)
This commit is contained in:
parent
ac9f582def
commit
162839672b
@ -14,6 +14,7 @@ def read_json(path: Path) -> Any:
|
||||
|
||||
def write_json(data: dict[str, Any], path: Path) -> None:
|
||||
try:
|
||||
path.parent.mkdir(parents=True, exist_ok=True)
|
||||
j = json.dumps(data, indent=2)
|
||||
path.write_text(j)
|
||||
except Exception as e:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user