]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/LeiOverview.pm
get rid of unnecessary bytes::length usage
[public-inbox.git] / lib / PublicInbox / LeiOverview.pm
index 28891460e49a1ed70bbb44beff75c1161e8b0456..223db22244eca51cf9554c76d685f4625d02e88a 100644 (file)
@@ -76,7 +76,7 @@ sub new {
        $fmt //= $devfd >= 0 ? 'json' : (detect_fmt($lei, $dst) or return);
 
        if (index($dst, '://') < 0) { # not a URL, so assume path
-                $dst = File::Spec->canonpath($dst);
+                $dst = $lei->canonpath_harder($dst);
        } # else URL
 
        my $self = bless { fmt => $fmt, dst => $dst }, $class;
@@ -108,6 +108,8 @@ sub new {
                        $opt->{alert} //= [ ':WINCH,:bell' ] if -t $lei->{1};
                }
        }
+       return $lei->fail('--shared is only for v2 inbox output') if
+               $self->{fmt} ne 'v2' && $lei->{opt}->{shared};
        $self;
 }