git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] gitweb.cgi: Create $git_temp if it doesn't exist

From
LTLuben Tuikov <ltuikov@yahoo.com>
Date
Jul 10, 2006, 03:07 UTC
Message-ID
<20060710030727.84377.qmail@web31804.mail.mud.yahoo.com>

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(-)
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
Message 1 of 1 in “gitweb.cgi: Create $git_temp if it doesn't exist”
  1. gitweb.cgi: Create $git_temp if it doesn't existLuben Tuikov, Jul 10, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.