user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
From: Eric Wong <e@80x24.org>
To: meta@public-inbox.org
Subject: [SQUASH 4/3] lei: account for unconfigured leistore.dir
Date: Fri, 26 Mar 2021 06:01:31 +0100	[thread overview]
Message-ID: <20210326050131.GA20425@dcvr> (raw)
In-Reply-To: <20210326042937.15913-3-e@80x24.org>

We just use the default directory if it's not in the
config.
---
 lib/PublicInbox/LEI.pm | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/PublicInbox/LEI.pm b/lib/PublicInbox/LEI.pm
index fab2af90..6a5c32b3 100644
--- a/lib/PublicInbox/LEI.pm
+++ b/lib/PublicInbox/LEI.pm
@@ -702,8 +702,9 @@ sub _lei_cfg ($;$) {
 	bless $cfg, 'PublicInbox::Config';
 	$cfg->{-st} = $cur_st;
 	$cfg->{'-f'} = $f;
-	if ($sto && File::Spec->canonpath($sto_dir) eq
-			File::Spec->canonpath($cfg->{'leistore.dir'})) {
+	if ($sto && File::Spec->canonpath($sto_dir // store_path($self))
+			eq File::Spec->canonpath($cfg->{'leistore.dir'} //
+						store_path($self))) {
 		$cfg->{-lei_store} = $sto;
 	}
 	if (scalar(keys %PATH2CFG) > 5) {

  reply	other threads:[~2021-03-26  5:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-26  4:29 [PATCH 0/3] lei labels support Eric Wong
2021-03-26  4:29 ` [PATCH 1/3] lei_xsearch: wait for kw updates for non-threaded case, too Eric Wong
2021-03-26  4:29 ` [PATCH 2/3] lei: _lei_store: use default even if unconfigured Eric Wong
2021-03-26  5:01   ` Eric Wong [this message]
2021-03-26  4:29 ` [PATCH 3/3] lei: add some labels support Eric Wong
2021-03-26 10:31 ` labels for externals [was: lei labels support] Eric Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://public-inbox.org/README

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210326050131.GA20425@dcvr \
    --to=e@80x24.org \
    --cc=meta@public-inbox.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.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).