unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] lib: load user config. in notmuch_database_open_verbose()
@ 2021-08-14 19:36 Austin Ray
  2021-08-14 19:56 ` David Bremner
  0 siblings, 1 reply; 5+ messages in thread
From: Austin Ray @ 2021-08-14 19:36 UTC (permalink / raw)
  To: notmuch; +Cc: Austin Ray

Docstring for notmuch_database_open_verbose() states it calls
notmuch_database_open_with_config() with "config_path=NULL"; however,
the implementation uses an empty string. This results in libnotmuch
ignoring the user's configuration and may cause issues in downstream
library consumers.

Signed-off-by: Austin Ray <austin@austinray.io>

---

NeoMutt has an open bug[0] related to this. The user is using a separate
database and email directory so libnotmuch returns file paths rooted in
the database directory when calling notmuch_database_open_verbose(). If
calling notmuch_database_open_with_config() with "config_path=NULL",
libnotmuch returns the correct file paths.

[0] https://github.com/neomutt/neomutt/issues/3017
---
 lib/open.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/open.cc b/lib/open.cc
index 7b95c5b1..0d25ba72 100644
--- a/lib/open.cc
+++ b/lib/open.cc
@@ -36,7 +36,7 @@ notmuch_database_open_verbose (const char *path,
 			       notmuch_database_t **database,
 			       char **status_string)
 {
-    return notmuch_database_open_with_config (path, mode, "", NULL,
+    return notmuch_database_open_with_config (path, mode, NULL, NULL,
 					      database, status_string);
 }
 
-- 
2.31.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-08-14 22:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-14 19:36 [PATCH] lib: load user config. in notmuch_database_open_verbose() Austin Ray
2021-08-14 19:56 ` David Bremner
2021-08-14 20:48   ` Austin Ray
2021-08-14 21:22     ` David Bremner
2021-08-14 22:40       ` Austin Ray

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).