From: jocuri%softhome.net <> Date: Wed, 7 Jul 2004 15:59:44 +0000 (+0000) Subject: Fix for bug 248988: On Windows, attachments may fail due to "CGI open of tmpfile... X-Git-Tag: bugzilla-2.18rc1~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a33e1550f4d3827de1217cd8d299cfe804669741;p=thirdparty%2Fbugzilla.git Fix for bug 248988: On Windows, attachments may fail due to "CGI open of tmpfile"; patch by byron jones (glob) ; r=jouni; a=justdave. --- diff --git a/CGI.pl b/CGI.pl index 6d10268d38..94e727f089 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;