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 ms11 with LMTPS id gApxO6D19l/qRAAA0tVLHw (envelope-from ) for ; Thu, 07 Jan 2021 11:50:56 +0000 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 qAE9N6D19l+KVAAAbx9fmQ (envelope-from ) for ; Thu, 07 Jan 2021 11:50:56 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [IPv6:2607:5300:201:3100::1657]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (2048 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 327C29404C4 for ; Thu, 7 Jan 2021 11:50:56 +0000 (UTC) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 4624F29D7A; Thu, 7 Jan 2021 06:50:46 -0500 (EST) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by mail.notmuchmail.org (Postfix) with ESMTP id A38E42852F for ; Thu, 7 Jan 2021 06:50:43 -0500 (EST) Received: by fethera.tethera.net (Postfix, from userid 1001) id A2A245FF47; Thu, 7 Jan 2021 06:50:40 -0500 (EST) Received: (nullmailer pid 2115811 invoked by uid 1000); Thu, 07 Jan 2021 11:50:38 -0000 From: David Bremner To: David Bremner , notmuch@notmuchmail.org Subject: [PATCH] fixup! support splitting mail from database location. Date: Thu, 7 Jan 2021 07:50:18 -0400 Message-Id: <20210107115018.2115759-1-david@tethera.net> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210105022350.643917-3-david@tethera.net> References: <20210105022350.643917-3-david@tethera.net> MIME-Version: 1.0 Message-ID-Hash: 5YJXCBRNDXLJ2JHET3KGYHWBPWOMAU7H X-Message-ID-Hash: 5YJXCBRNDXLJ2JHET3KGYHWBPWOMAU7H X-MailFrom: bremner@tethera.net 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 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 X-Migadu-Spam-Score: -0.89 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 327C29404C4 X-Spam-Score: -0.89 X-Migadu-Scanner: scn0.migadu.com X-TUID: tzenYca+LQyo --- notmuch-insert.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/notmuch-insert.c b/notmuch-insert.c index e483b949..4ae65d4d 100644 --- a/notmuch-insert.c +++ b/notmuch-insert.c @@ -448,7 +448,7 @@ notmuch_insert_command (unused(notmuch_config_t *config),notmuch_database_t *not { notmuch_status_t status, close_status; struct sigaction action; - const char *db_path; + const char *db_path, *mail_root; notmuch_config_values_t *new_tags = NULL; tag_op_list_t *tag_ops; char *query_string = NULL; @@ -489,6 +489,8 @@ notmuch_insert_command (unused(notmuch_config_t *config),notmuch_database_t *not else db_path = talloc_strdup (local, db_path); + mail_root = notmuch_config_get (notmuch, NOTMUCH_CONFIG_MAIL_ROOT); + new_tags = notmuch_config_get_values (notmuch, NOTMUCH_CONFIG_NEW_TAGS); if (print_status_database ( @@ -533,7 +535,7 @@ notmuch_insert_command (unused(notmuch_config_t *config),notmuch_database_t *not return EXIT_FAILURE; } - maildir = talloc_asprintf (local, "%s/%s", db_path, folder); + maildir = talloc_asprintf (local, "%s/%s", mail_root, folder); if (! maildir) { fprintf (stderr, "Out of memory\n"); return EXIT_FAILURE; -- 2.29.2