]> Lady’s Gitweb - Gitweb/commitdiff
gitweb.cgi: Create $git_temp if it doesn't exist
authorLuben Tuikov <redacted>
Mon, 10 Jul 2006 03:07:27 +0000 (20:07 -0700)
committerLady <redacted>
Sat, 4 Apr 2026 18:43:37 +0000 (14:43 -0400)
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
gitweb.cgi

index dab419f28b74b6ddc658772a2a718e9fedc252c03aac983060f243ea79046061..78d89fae7c4a81504244ca7aaeab0278ffee8fd1e72e196f73645187a37da72c 100755 (executable)
@@ -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;
This page took 0.179786 seconds and 4 git commands to generate.