} elsif ($loc =~ m!\Ahttps?://!) {
require URI;
return add_uri($self, URI->new($loc));
- } elsif (-f "$loc/ei.lock") {
+ } elsif (-f "$loc/ei.lock" && -d "$loc/ALL.git/objects") {
require PublicInbox::ExtSearch;
die "`\\n' not allowed in `$loc'\n" if index($loc, "\n") >= 0;
$loc = PublicInbox::ExtSearch->new($loc);
- } elsif (-f "$loc/inbox.lock" || -d "$loc/public-inbox") {
+ } elsif ((-f "$loc/inbox.lock" && -d "$loc/all.git/objects") ||
+ (-d "$loc/public-inbox" && -d "$loc/objects")) {
die "`\\n' not allowed in `$loc'\n" if index($loc, "\n") >= 0;
require PublicInbox::Inbox; # v2, v1
$loc = bless { inboxdir => $loc }, 'PublicInbox::Inbox';
for my $lk (qw(ei inbox)) {
my $d = "$home/newline\n$lk";
- mkdir $d;
+ my $all = $lk eq 'ei' ? 'ALL' : 'all';
+ File::Path::mkpath("$d/$all.git/objects");
open my $fh, '>', "$d/$lk.lock" or BAIL_OUT "open $d/$lk.lock";
for my $fl (qw(-I --only)) {
ok(!lei('q', $fl, $d, 'whatever'),