unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
* [PATCH] admin: resolve inboxes to absolute paths for index
@ 2020-12-22  6:01 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2020-12-22  6:01 UTC (permalink / raw)
  To: meta

Some of my ancient v1-only scripts called public-inbox-index
to operate on GIT_DIR:

	GIT_DIR=/path/to/foo.git public-inbox-index

This change ensures they keep working, otherwise "." will be
passed to the --git-dir= switch of git(1) because that's the
default directory if no inboxes are specified on the
command-line.

Fixes: 9fcce78e40b0a7c6 ("script/public-inbox-*: favor caller-provided pathnames")
---
 lib/PublicInbox/Admin.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/PublicInbox/Admin.pm b/lib/PublicInbox/Admin.pm
index c972fb68..9a86d206 100644
--- a/lib/PublicInbox/Admin.pm
+++ b/lib/PublicInbox/Admin.pm
@@ -127,7 +127,7 @@ sub resolve_inboxes ($;$$) {
 		for (my $i = 0; $i <= $#dirs; $i++) {
 			my $dir = $dirs[$i];
 			my @st = stat($dir) or die "stat($dir): $!\n";
-			$dir = resolve_inboxdir($dir, \(my $ver));
+			$dir = $dirs[$i] = resolve_inboxdir($dir, \(my $ver));
 			if ($ver >= $min_ver) {
 				$s2i{"$st[0]\0$st[1]"} //= $i;
 			} else {

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-12-22  6:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-22  6:01 [PATCH] admin: resolve inboxes to absolute paths for index Eric Wong

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).