gitweb.cgi: Create $git_temp if it doesn't exist
[gitweb.git] / gitweb / gitweb.cgi
index cce0753e14a5c56adf4fad4984282d044675f42d..2fb2809fbb38b02f751115ad3a0d0d93a5ccd598 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;