mirror of
https://github.com/aclist/dztui.git
synced 2026-10-25 12:12:31 +01:00
fix: make parents if missing (#312)
This commit is contained in:
1 parent
ac9f582def
commit
162839672b
1 file changed
+1
@@ -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:
|
||||
|
||||
Reference in new issue
Block a user