From: Renee Baecker Date: Wed, 20 Aug 2008 11:26:02 +0000 (+0200) Subject: Re: Re: [perl #30524] [PATCH] CGI.pm has poor list of temp directories on Windows X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7ee5fac837a8a4ebf1956da1b1d252aa82fe506d;p=p5sagit%2Fp5-mst-13.2.git Re: Re: [perl #30524] [PATCH] CGI.pm has poor list of temp directories on Windows Message-Id: <20080820092602.A87A612001D@rserv16.sitepush.net> p4raw-id: //depot/perl@34208 --- diff --git a/lib/CGI.pm b/lib/CGI.pm index 7fce53b..5196528 100644 --- a/lib/CGI.pm +++ b/lib/CGI.pm @@ -19,7 +19,7 @@ use Carp 'croak'; # http://stein.cshl.org/WWW/software/CGI/ $CGI::revision = '$Id: CGI.pm,v 1.257 2008/08/06 14:01:06 lstein Exp $'; -$CGI::VERSION='3.40'; +$CGI::VERSION='3.40_01'; # HARD-CODED LOCATION FOR FILE UPLOAD TEMPORARY FILES. # UNCOMMENT THIS ONLY IF YOU KNOW WHAT YOU'RE DOING. @@ -4050,6 +4050,14 @@ sub find_tempdir { "${vol}${SL}Temporary Items", "${SL}WWW_ROOT", "${SL}SYS\$SCRATCH", "C:${SL}system${SL}temp"); + + if( $CGI::OS eq 'WINDOWS' ){ + unshift @TEMP, + $ENV{TEMP}, + $ENV{TMP}, + $ENV{WINDIR} . $SL . 'TEMP'; + } + unshift(@TEMP,$ENV{'TMPDIR'}) if defined $ENV{'TMPDIR'}; # this feature was supposed to provide per-user tmpfiles, but