Subject: | [PATCH] Sync File::Temp wtih bleadperl |
The following patch was applied to bleadperl to fix errors seen on Cygwin.
Thanks,
Steve Peters
Change 32892 by rgs@stcosmo on 2008/01/07 16:55:44
Subject: [PATCH] v5.8.8: File::Temp.pm (_gettemp): ignore dir -w test
on Cygwin
From: Jari Aalto <jari.aalto@cante.net>
Date: Sat, 05 Jan 2008 13:22:17 +0200
Message-ID: <bq8034ba.fsf@blue.sea.net>
Affected files ...
... //depot/perl/lib/File/Temp.pm#38 edit
Differences ...
==== //depot/perl/lib/File/Temp.pm#38 (text) ====
@@ -203,7 +203,7 @@
# Version number
-$VERSION = '0.20';
+$VERSION = '0.20_01';
# This is a list of characters that can be used in random filenames
@@ -462,7 +462,13 @@
${$options{ErrStr}} = "Parent directory ($parent) is not a directory";
return ();
}
- unless (-w $parent) {
+
+ if ( $^O eq 'cygwin' ) {
+ # No-op special case. Under Windows Cygwin (FAT32) the directory
+ # permissions cannot be trusted. Directories are always
+ # writable.
+ }
+ elsif (not -w $parent) {
${$options{ErrStr}} = "Parent directory ($parent) is not writable\n";
return ();
}