stas 2004/11/04 05:27:03
Modified: t/lib/TestAPRlib finfo.pm
Log:
On Win32, touch the file to ensure it is in the same Daylight Saving
Time season as the current time to workaround a bug in Win32's stat()
which APR::Finfo allows for, otherwise the two disagree.
Submitted by: Steve Hay <[EMAIL PROTECTED]>
Revision Changes Path
1.6 +8 -0 modperl-2.0/t/lib/TestAPRlib/finfo.pm
Index: finfo.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/t/lib/TestAPRlib/finfo.pm,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -u -r1.5 -r1.6
--- finfo.pm 22 Sep 2004 01:29:30 -0000 1.5
+++ finfo.pm 4 Nov 2004 13:27:03 -0000 1.6
@@ -30,6 +30,14 @@
sub test {
my $file = __FILE__;
+
+ # On Win32, touch the file to ensure it is in the same Daylight Saving
+ # Time season as the current time to workaround a bug in Win32's stat()
+ # which APR::Finfo allows for, otherwise the two disagree.
+ if (WIN32) {
+ utime undef, undef, $file;
+ }
+
my $pool = APR::Pool->new();
# populate the finfo struct first
my $finfo = APR::Finfo::stat($file, APR::FINFO_NORM, $pool);