summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorChip Salzenberg <chip@perl.com>1997-04-10 07:48:55 +1200
committerChip Salzenberg <chip@atlantic.net>1997-05-16 10:15:00 +1200
commit1f4739df3b104a71e91e8f6e96c33e6309e06d36 (patch)
treec72623e39b7f1086a47a38d1d6f82897a0a73aa6 /ext
parent7d37aa8ee0fac2db54fce8cbb5b1e5e3c1188e88 (diff)
downloadperl-1f4739df3b104a71e91e8f6e96c33e6309e06d36.tar.gz
In IO::File::open, prepend './' less often (for Win32 et al)
Diffstat (limited to 'ext')
-rw-r--r--ext/IO/lib/IO/File.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/IO/lib/IO/File.pm b/ext/IO/lib/IO/File.pm
index 9d647b3571..b1aecffb5d 100644
--- a/ext/IO/lib/IO/File.pm
+++ b/ext/IO/lib/IO/File.pm
@@ -115,7 +115,7 @@ require DynaLoader;
@ISA = qw(IO::Handle IO::Seekable Exporter DynaLoader);
-$VERSION = "1.0601";
+$VERSION = "1.0602";
@EXPORT = @IO::Seekable::EXPORT;
@@ -165,7 +165,7 @@ sub open {
defined $perms or $perms = 0666;
return sysopen($fh, $file, $mode, $perms);
}
- $file = './' . $file unless substr($file, 0, 1) eq '/';
+ $file = './' . $file if $file =~ m{\A[^\\/\w]};
$file = IO::Handle::_open_mode_string($mode) . " $file\0";
}
open($fh, $file);