summaryrefslogtreecommitdiff
path: root/gitweb
diff options
context:
space:
mode:
authorLibravatar Luben Tuikov <ltuikov@yahoo.com>2006-07-09 20:07:27 -0700
committerLibravatar Junio C Hamano <junkio@cox.net>2006-07-10 00:21:33 -0700
commit9af25117963382b5f4c342bc9dbae7b4e60c4a11 (patch)
treebcb1a3cf52a6c16bf2decc6dce98f89308be8579 /gitweb
parentMerge branch 'lt/gitweb' (diff)
downloadtgif-9af25117963382b5f4c342bc9dbae7b4e60c4a11.tar.xz
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 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;