gitweb.cgi: Create $git_temp if it doesn't exist

Unless we'd done diffs, $git_temp doesn't exist and then
mime lookups fail.  Explicitly create it, if it doesn't
exist already.

Signed-off-by: Luben Tuikov <ltuikov@yahoo.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Luben Tuikov 2006-07-09 20:07:27 -07:00 committed by Junio C Hamano
parent 8499294c41
commit 9af2511796

View File

@ -39,6 +39,9 @@ if ($git_version =~ m/git version (.*)$/) {
# location for temporary files needed for diffs
our $git_temp = "/tmp/gitweb";
if (! -d $git_temp) {
mkdir($git_temp, 0700) || die_error("Couldn't mkdir $git_temp");
}
# target of the home link on top of all pages
our $home_link = $my_uri;