This happens if somebody uses a bogus filename like `.' for the
`b=' parameter (e.g. GET `$REPO/$OID/?b=.').
---
 lib/PublicInbox/ViewVCS.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/PublicInbox/ViewVCS.pm b/lib/PublicInbox/ViewVCS.pm
index 964b7345..3ab39c8b 100644
--- a/lib/PublicInbox/ViewVCS.pm
+++ b/lib/PublicInbox/ViewVCS.pm
@@ -514,7 +514,7 @@ sub solve_result {
        return show_other($ctx, $res) if $type ne 'blob';
        my $fn = $di->{path_b} // $hints->{path_b};
        my $paths = $ctx->{-paths} //= do {
-               my $path = to_filename($fn // 'blob');
+               my $path = to_filename($fn // 'blob') // 'blob';
                my $raw_more = qq[(<a\nhref="$path">raw</a>)];
                my @def;
 

Reply via email to