{"thread":{"id":"4821","subject":"[PATCH] gitweb.cgi: Create $git_temp if it doesn't exist","startedAt":"2006-07-10T03:07:27Z","lastAt":"2006-07-10T03:07:27Z","messageCount":1,"participants":["Luben Tuikov"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"23511","messageId":"20060710030727.84377.qmail@web31804.mail.mud.yahoo.com","threadId":"4821","inReplyTo":null,"subject":"[PATCH] gitweb.cgi: Create $git_temp if it doesn't exist","fromName":"Luben Tuikov","fromEmail":"ltuikov@yahoo.com","sentAt":"2006-07-10T03:07:27Z","receivedAt":"2006-07-10T03:07:27Z","isPatch":true,"sender":{"key":"ltuikov@yahoo.com","avatar":null},"body":"Unless we'd done diffs, $git_temp doesn't exist and then\nmime lookups fail.  Explicitly create it, if it doesn't\nexist already.\n\nSigned-off-by: Luben Tuikov <ltuikov@yahoo.com>\n---\n gitweb/gitweb.cgi |    3 +++\n 1 files changed, 3 insertions(+), 0 deletions(-)\n\ndiff --git a/gitweb/gitweb.cgi b/gitweb/gitweb.cgi\nindex 6798990..d37f4c6 100755\n--- a/gitweb/gitweb.cgi\n+++ b/gitweb/gitweb.cgi\n@@ -41,6 +41,9 @@ if ($git_version =~ m/git version (.*)$/\n \n # location for temporary files needed for diffs\n our $git_temp = \"/tmp/gitweb\";\n+if (! -d $git_temp) {\n+    mkdir($git_temp, 0700) || die_error(\"Couldn't mkdir $git_temp\");\n+}\n \n # target of the home link on top of all pages\n our $home_link = $my_uri;\n-- \n1.4.1.g35dbd\n\n"}]}