@matheusbsbs / matheus-bagliano / commits / 9af2511796
Fork 0

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>

Luben Tuikov committed Jul 9, 2006 at 20:07 UTC 9af25117963382b5f4c342bc9dbae7b4e60c4a11
1 file changed +3
gitweb/gitweb.cgi
+3
@@ -39,6 +39,9 @@ if ($git_version =~ m/git version (.*)$/) {
39
40 # location for temporary files needed for diffs
41 our $git_temp = "/tmp/gitweb";
42 +if (! -d $git_temp) {
43 + mkdir($git_temp, 0700) || die_error("Couldn't mkdir $git_temp");
44 +}
45
46 # target of the home link on top of all pages
47 our $home_link = $my_uri;