Git development
 help / color / mirror / Atom feed
From: Luben Tuikov <ltuikov@yahoo.com>
To: git@vger.kernel.org
Subject: [PATCH] gitweb.cgi: Create $git_temp if it doesn't exist
Date: Sun, 9 Jul 2006 20:07:27 -0700 (PDT)	[thread overview]
Message-ID: <20060710030727.84377.qmail@web31804.mail.mud.yahoo.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 260 bytes --]

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>
---
 gitweb/gitweb.cgi |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

[-- Attachment #2: 2829251161-patch.patch --]
[-- Type: application/octet-stream, Size: 461 bytes --]

diff --git a/gitweb/gitweb.cgi b/gitweb/gitweb.cgi
index 6798990..d37f4c6 100755
--- a/gitweb/gitweb.cgi
+++ b/gitweb/gitweb.cgi
@@ -41,6 +41,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;
-- 
1.4.1.g35dbd


                 reply	other threads:[~2006-07-10  3:07 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060710030727.84377.qmail@web31804.mail.mud.yahoo.com \
    --to=ltuikov@yahoo.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox