X-Git-Url: https://git.ladys.computer/Gitweb/blobdiff_plain/2ea0a7483829c6cb75a7c26e19fd8cfb5587e2455de55d5bd7bebd95242219e2..af2511429b7ac58f6bb27087cdbf4c0fbae847247cb21f0d4db744f7f397d8d3:/gitweb.cgi diff --git a/gitweb.cgi b/gitweb.cgi index dbafb5d..fec89e7 100755 --- a/gitweb.cgi +++ b/gitweb.cgi @@ -22,13 +22,13 @@ my $my_url = $cgi->url(); my $my_uri = $cgi->url(-absolute => 1); my $rss_link = ""; +# location of the git-core binaries +my $gitbin = "/usr/bin"; + # absolute fs-path which will be prepended to the project path #my $projectroot = "/pub/scm"; my $projectroot = "/home/kay/public_html/pub/scm"; -# location of the git-core binaries -my $gitbin = "/usr/bin"; - # version of the git-core binaries my $git_version = qx($gitbin/git --version); if ($git_version =~ m/git version (.*)$/) { @@ -86,8 +86,9 @@ if (defined $order) { } } -my $project = $cgi->param('p'); +my $project = ($cgi->param('p') || $ENV{'PATH_INFO'}); if (defined $project) { + $project =~ s|^/||; $project =~ s|/$||; $project = validate_input($project); if (!defined($project)) { die_error(undef, "Invalid project parameter.");