Skip to content

Commit

Permalink
gitweb.cgi: Create $git_temp if it doesn't exist
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Luben Tuikov authored and Junio C Hamano committed Jul 10, 2006
1 parent 8499294 commit 9af2511
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gitweb/gitweb.cgi
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9af2511

Please sign in to comment.