From 9af25117963382b5f4c342bc9dbae7b4e60c4a11 Mon Sep 17 00:00:00 2001 From: Luben Tuikov Date: Sun, 9 Jul 2006 20:07:27 -0700 Subject: [PATCH] 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 Signed-off-by: Junio C Hamano --- gitweb/gitweb.cgi | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gitweb/gitweb.cgi b/gitweb/gitweb.cgi index cce0753e14..2fb2809fbb 100755 --- a/gitweb/gitweb.cgi +++ b/gitweb/gitweb.cgi @@ -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; -- 2.11.4.GIT