From: Luben Tuikov Date: Mon, 10 Jul 2006 03:07:27 +0000 (-0700) Subject: gitweb.cgi: Create $git_temp if it doesn't exist X-Git-Tag: v1.4.2-rc1~51 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=9af25117963382b5f4c342bc9dbae7b4e60c4a11;p=git.git 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 --- diff --git a/gitweb/gitweb.cgi b/gitweb/gitweb.cgi index cce0753e1..2fb2809fb 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;