From 978ba09c8b061d86c52045b2bee2a2bdd7901c7d Mon Sep 17 00:00:00 2001 From: Emil Lerch Date: Wed, 15 Oct 2025 19:25:36 -0700 Subject: [PATCH] log actual path of notmuch db --- src/root.zig | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/root.zig b/src/root.zig index d7c002f..88761e3 100644 --- a/src/root.zig +++ b/src/root.zig @@ -292,8 +292,12 @@ pub fn openNotmuchDb(allocator: std.mem.Allocator, relative_path: []const u8, em var cwd_buf: [std.fs.max_path_bytes]u8 = undefined; const cwd = try std.fs.cwd().realpath(".", cwd_buf[0..]); const db_path = try std.fs.path.joinZ(allocator, &[_][]const u8{ cwd, relative_path }); + errdefer allocator.free(db_path); - const db = try notmuch.Db.open(db_path, null); + const db = notmuch.Db.open(db_path, null) catch |err| { + std.log.err("Could not open {s}", .{db_path}); + return err; + }; const email = email_engine orelse Email.init();