aboutsummaryrefslogtreecommitdiff
path: root/lib/open.cc
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2021-08-04 07:42:35 -0300
committerDavid Bremner <david@tethera.net>2021-08-17 17:09:21 -0700
commitd9300116909ea316c84fd6d3ee57c89074dcd260 (patch)
tree96c47bfaab6608fb182200346b7e0ffeae71b98e /lib/open.cc
parent8376e814412f8165b781aa21dac654c2fc948306 (diff)
lib/open: look in MAILDIR for database, as documented.
This fixes the bug id:87bl9lx864.fsf@kisara.moe
Diffstat (limited to 'lib/open.cc')
-rw-r--r--lib/open.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/open.cc b/lib/open.cc
index 3325e725..13743459 100644
--- a/lib/open.cc
+++ b/lib/open.cc
@@ -221,6 +221,10 @@ _choose_database_path (void *ctx,
}
if (! *database_path) {
+ *database_path = getenv ("MAILDIR");
+ }
+
+ if (! *database_path) {
notmuch_status_t status;
*database_path = talloc_asprintf (ctx, "%s/mail", getenv ("HOME"));