From a33e1550f4d3827de1217cd8d299cfe804669741 Mon Sep 17 00:00:00 2001 From: "jocuri%softhome.net" <> Date: Wed, 7 Jul 2004 15:59:44 +0000 Subject: Fix for bug 248988: On Windows, attachments may fail due to "CGI open of tmpfile"; patch by byron jones (glob) ; r=jouni; a=justdave. --- CGI.pl | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'CGI.pl') diff --git a/CGI.pl b/CGI.pl index 6d10268d3..94e727f08 100644 --- a/CGI.pl +++ b/CGI.pl @@ -32,6 +32,14 @@ use lib "."; # use Carp; # for confess +BEGIN { + if ($^O =~ /MSWin32/i) { + # Help CGI find the correct temp directory as the default list + # isn't Windows friendly (Bug 248988) + $ENV{'TMPDIR'} = $ENV{'TEMP'} || $ENV{'TMP'} || "$ENV{'WINDIR'}\\TEMP"; + } +} + use Bugzilla::Util; use Bugzilla::Config; use Bugzilla::Constants; -- cgit v1.2.3-24-g4f1b