Skip to content

Commit 9af2511

Browse files
ltuikovJunio C Hamano
authored andcommitted
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>
1 parent 8499294 commit 9af2511

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

gitweb/gitweb.cgi

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ if ($git_version =~ m/git version (.*)$/) {
3939

4040
# location for temporary files needed for diffs
4141
our $git_temp = "/tmp/gitweb";
42+
if (! -d $git_temp) {
43+
mkdir($git_temp, 0700) || die_error("Couldn't mkdir $git_temp");
44+
}
4245

4346
# target of the home link on top of all pages
4447
our $home_link = $my_uri;

0 commit comments

Comments
 (0)