Subject: | tmpdir.t fails on Win32 on second and subsequent runs |
tmpdir.t sets the temporary directories to mode 0500 but doesn't reset
them later. On Win32 that mode sets the read-only flag, which prevents
the END{} block's rmdir from succeeding so subsequent smoke or test runs
start failing the test.
Patch (versus perl.git v5.14.0-576-g6693394) attached.
Subject: | tmpdir.patch |
diff --git a/cpan/CGI/lib/CGI.pm b/cpan/CGI/lib/CGI.pm
index 876ba27..b71769b 100644
--- a/cpan/CGI/lib/CGI.pm
+++ b/cpan/CGI/lib/CGI.pm
@@ -20,7 +20,7 @@ use Carp 'croak';
# The revision is no longer being updated since moving to git.
$CGI::revision = '$Id: CGI.pm,v 1.266 2009/07/30 16:32:34 lstein Exp $';
-$CGI::VERSION='3.54';
+$CGI::VERSION='3.54_01';
# HARD-CODED LOCATION FOR FILE UPLOAD TEMPORARY FILES.
# UNCOMMENT THIS ONLY IF YOU KNOW WHAT YOU'RE DOING.
diff --git a/cpan/CGI/t/tmpdir.t b/cpan/CGI/t/tmpdir.t
index 6e3fcbd..1407356 100644
--- a/cpan/CGI/t/tmpdir.t
+++ b/cpan/CGI/t/tmpdir.t
@@ -37,4 +37,4 @@ isnt($CGITempFile::TMPDIRECTORY, $testdir,
"unwritable \$ENV{TMPDIR} not overridden with an unwritable \$CGITempFile::TMPDIRECTORY");
}
-END { rmdir for ($testdir, $testdir2) }
+END { for ($testdir, $testdir2) { chmod 0700, $_; rmdir; } }