fix filenotfound

This commit is contained in:
Aron Petau 2025-11-20 11:13:09 +01:00
parent e80bb9577a
commit 926aaefd85
3 changed files with 152 additions and 37 deletions

View file

@ -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)