summaryrefslogtreecommitdiff
path: root/gitweb
diff options
context:
space:
mode:
authorLuben Tuikov <ltuikov@yahoo.com>2006-07-10 03:07:27 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-07-10 07:21:33 (GMT)
commit9af25117963382b5f4c342bc9dbae7b4e60c4a11 (patch)
treebcb1a3cf52a6c16bf2decc6dce98f89308be8579 /gitweb
parent8499294c41fe92a560a083c42caad36b4e27fb51 (diff)
downloadgit-9af25117963382b5f4c342bc9dbae7b4e60c4a11.zip
git-9af25117963382b5f4c342bc9dbae7b4e60c4a11.tar.gz
git-9af25117963382b5f4c342bc9dbae7b4e60c4a11.tar.bz2
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>
Diffstat (limited to 'gitweb')
-rwxr-xr-xgitweb/gitweb.cgi3
1 files changed, 3 insertions, 0 deletions
diff --git a/gitweb/gitweb.cgi b/gitweb/gitweb.cgi
index cce0753..2fb2809 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;