X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=lib%2Fopen.cc;h=6e46168a78d20a8418e3b7535c4a464c7813aa87;hb=793d4305d3563082761a59ac418ce827d00bdc39;hp=d05a19a76c2336515bcea293e7ab0d5ce5691613;hpb=13efbd0e1c88fcbdb48b4c30c7852c5bf1fbd0b7;p=notmuch diff --git a/lib/open.cc b/lib/open.cc index d05a19a7..6e46168a 100644 --- a/lib/open.cc +++ b/lib/open.cc @@ -168,6 +168,10 @@ _choose_database_path (void *ctx, return status; } + if (! *database_path) { + *database_path = getenv ("NOTMUCH_DATABASE"); + } + if (! *database_path && *key_file) { char *path = g_key_file_get_value (*key_file, "database", "path", NULL); if (path) {