summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRenee Baecker <renee.baecker@smart-websolutions.de>2008-08-20 13:26:02 +0200
committerH.Merijn Brand <h.m.brand@xs4all.nl>2008-08-20 13:55:37 +0000
commit7ee5fac837a8a4ebf1956da1b1d252aa82fe506d (patch)
tree1459a00e0a217d317531403494c24e688318f0f6
parent69032df759077efeb83d93bc723997187a0d2884 (diff)
downloadperl-7ee5fac837a8a4ebf1956da1b1d252aa82fe506d.tar.gz
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
-rw-r--r--lib/CGI.pm10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/CGI.pm b/lib/CGI.pm
index 7fce53b2aa..5196528f3f 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