From d9db4d6bde8af9d165d5724216d29a6ef97bad9f Mon Sep 17 00:00:00 2001 From: omicron Date: Fri, 9 Jan 2026 15:39:48 +0100 Subject: [PATCH] Fix init crashing if db parent directory does not exist The init command now correctly creates the parent directory of the database file. Fixes #1. --- mft/cli.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mft/cli.py b/mft/cli.py index 350974f..d6ea4c7 100644 --- a/mft/cli.py +++ b/mft/cli.py @@ -113,6 +113,8 @@ def db_command(args, settings): def db_init_command(args, settings): from mft.database import get_db, db_init, SchemaError + settings.database_path.parent.mkdir(parents=True, exist_ok=True) + with get_db() as conn: try: db_init(conn)