From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id cO4aDnUbGGFKDgAAgWs5BA (envelope-from ) for ; Sat, 14 Aug 2021 21:37:25 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id oPmdCXUbGGFDYQAAbx9fmQ (envelope-from ) for ; Sat, 14 Aug 2021 19:37:25 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [144.217.243.247]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id DA53012F0C for ; Sat, 14 Aug 2021 21:37:24 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 621021FB75; Sat, 14 Aug 2021 15:37:21 -0400 (EDT) Received: from mail-qt1-x82b.google.com (mail-qt1-x82b.google.com [IPv6:2607:f8b0:4864:20::82b]) by mail.notmuchmail.org (Postfix) with ESMTPS id 682491FB6C for ; Sat, 14 Aug 2021 15:37:19 -0400 (EDT) Received: by mail-qt1-x82b.google.com with SMTP id d9so11074441qty.12 for ; Sat, 14 Aug 2021 12:37:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=austinray-io.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=hqMrb0CwNeZZu88+0blBV8s+HljrTt+OBKTFoQKs0sU=; b=KDYIEuN1Ca8rDje2gX0RPYquAZB91auHoawIw6gUiLBv3gV/rUYdHY01B9th2XqZLY /iB/BK6YPQGRJom6yn3nZxCdQdKZtsIxwi0cA2BKOEYp0z4A09iNcA7TOVvaig578GOJ 1Q4mLpIqGxRHr/n8kCMAj6/L7PgZ9ROBj2RdwiZ47YGUwmJn7BqbtGLFYtUmbhO/nhpx c+tpLDyU8d+p8CNDy+lLD6tGcGxT7tHYimrIbJ/JuKZ0sEtqi3C0+JTj+ZCatJlzG88e I0Qhw8wPJdBC5u7LLxxR1yRvNSH1bOyV/clj4AheFttck0AayArGocF/Rkqk668nfQlc d86g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=hqMrb0CwNeZZu88+0blBV8s+HljrTt+OBKTFoQKs0sU=; b=rj2hTkIRHAIKzP7q6fGj0pUNlaL+HxaTchDQQssCrtZOLiI9VkobLUGZm6+AnfumOY hsPC+tPG9FviUMnxff/0hTqp3J58v2IOuHX3V9zg90pSW9NhnqO8Ce/kQJGHjaeen0Es Z/RCBCAA7zuUiJZazBBIH3b4NHj59DbwYoj3toB1X9V9Y9g71FcG+HQVkTKxedMhqqtJ FQxSLOdI09eKLy7NxNlP4eKK090xIC6Wje18AJ1gKVKN//6SPkvCcGRiBHfKla16UfL/ YTG6xPcAT1afKEK+s2bcBko8EWHn6VUWPVFN5vQ6nSfrYqwtXwAr+n9tLya26uhUd9yz PlCw== X-Gm-Message-State: AOAM532qO4j8IWMC7DMog/CdXMrLUi47qzniTGpzD4JfP9srgVcQTZp1 FE/lclX1p4y/jgxR33BMwUz+mxhcq3YqPA== X-Google-Smtp-Source: ABdhPJxV0SXbFUUUzeMlEZqT7lhMzJ0N1/anJnWYxLOlvQicg5cb3Wy1b66N0kZJac0zeS1mE+PJZw== X-Received: by 2002:ac8:140b:: with SMTP id k11mr7240327qtj.48.1628969833813; Sat, 14 Aug 2021 12:37:13 -0700 (PDT) Received: from localhost.localdomain (68-20-11-88.lightspeed.rlghnc.sbcglobal.net. [68.20.11.88]) by smtp.gmail.com with ESMTPSA id k186sm1398055qkd.47.2021.08.14.12.37.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 14 Aug 2021 12:37:13 -0700 (PDT) From: Austin Ray To: notmuch@notmuchmail.org Subject: [PATCH] lib: load user config. in notmuch_database_open_verbose() Date: Sat, 14 Aug 2021 15:36:47 -0400 Message-Id: <20210814193647.3313589-1-austin@austinray.io> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Message-ID-Hash: XJSPHU43D2GE2RZTWPI2MKVJBC3GSWJ5 X-Message-ID-Hash: XJSPHU43D2GE2RZTWPI2MKVJBC3GSWJ5 X-MailFrom: austin@austinray.io X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header CC: Austin Ray X-Mailman-Version: 3.2.1 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1628969845; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=yDIoLjkwr/pgXwOqkYgM827Z/MN1Bj4F2mckxCcJKd0=; b=aEtD5TxbS0UEmWFc2jabn9ifPn85lrxLlW3TBuplWtXuxNjQvHQbEy69gNphTVHbZCYKi8 AlsoyG7gQvWzCXtXkDjAg+ltVzA2muERNgPrrqpubjIxa/buiWXCsyDkGeOJdI4ldUI+gi gX8coDL3tbg0nUKKJns30O6gcbxHSy7EwYddWnRUM6/vCc+hD6os2b3GikPJaCHBDf4Vmy zFY39MlCB6AHpEJoOEEt3Hm0ckHXrhsO3mDeSzrYZUeZ8vHK+/nmxzIEA12qajk5JJ/j4p ezUiTgVewTehsiCOPuigzqxJ3oKKpLGdzh37SPCKP1gIgtztcPyyKPTXgSjKsA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1628969845; a=rsa-sha256; cv=none; b=sat9uW/gx2CkCsd1fSY0R+CJdBboTKJlRqS8VxbVNrpmlCotmuv3Dry5ALZH4VNxwYqJET RCVMRuVd9MOZLqolJBDPYNm22umvX7R5aGLAsg0/flDO/3GnkbpmRAtGTbsRz6eK0WqA7q 01oNusS3tBLKE62TqodRJx9hp3y4MIoqtkSDgTPeB0QjnBd9Xqqx2HrdhfQT2kMzAD72rC mqoRJiKREQEUu6hl3V2W0/n1kf0VLfK0/MhPvQxksTdZEUY/Wl7yjuI3KL6buCq4uUvfiN w0u0QF9c5ht4Qhn4GlodiPapnFpEVyDnsEmXtoqx1xNMr+OPJYPYKU567Jh40g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=austinray-io.20150623.gappssmtp.com header.s=20150623 header.b=KDYIEuN1; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -0.03 Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=austinray-io.20150623.gappssmtp.com header.s=20150623 header.b=KDYIEuN1; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: DA53012F0C X-Spam-Score: -0.03 X-Migadu-Scanner: scn0.migadu.com X-TUID: om1ge9qyabrB 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 --- 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