fix filenotfound
This commit is contained in:
parent
e80bb9577a
commit
926aaefd85
3 changed files with 152 additions and 37 deletions
|
|
@ -66,6 +66,7 @@ def load_tasks():
|
|||
return []
|
||||
|
||||
def save_tasks():
|
||||
TASKS_FILE.parent.mkdir(parents=True, exist_ok=True) # Ensure data/ directory exists
|
||||
with open(TASKS_FILE, "w", encoding="utf-8") as f:
|
||||
json.dump([t.dict() for t in tasks], f, ensure_ascii=False, indent=2)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue