summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMichael A Chase <mchase@ix.netcom.com>2002-05-06 06:58:48 -0700
committerJarkko Hietaniemi <jhi@iki.fi>2002-05-07 13:57:25 +0000
commit04ca015e83d9ca4de9e8d903a6e95460b4053132 (patch)
tree92a4f21682ef9836e34bf106e12e0b872f5e973f /lib
parent5a35688369fffaf661c919710f783712ba978b59 (diff)
downloadperl-04ca015e83d9ca4de9e8d903a6e95460b4053132.tar.gz
[ID 20020506.009] File::Spec::Unix::canonpath under cygwin
Message-Id: <E174pZk-0008IP-00@smtp6.mindspring.com> (plus add what POSIX says) p4raw-id: //depot/perl@16444
Diffstat (limited to 'lib')
-rw-r--r--lib/File/Spec/Unix.pm8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/File/Spec/Unix.pm b/lib/File/Spec/Unix.pm
index 49c522ac71..c3e61d881b 100644
--- a/lib/File/Spec/Unix.pm
+++ b/lib/File/Spec/Unix.pm
@@ -37,9 +37,13 @@ path. On UNIX eliminates successive slashes and successive "/.".
sub canonpath {
my ($self,$path) = @_;
- # Handle POSIX-style node names beginning with double slash
+ # Handle POSIX-style node names beginning with double slash (qnx, nto)
+ # Handle network path names beginning with double slash (cygwin)
+ # (POSIX says: "a pathname that begins with two successive slashes
+ # may be interpreted in an implementation-defined manner, although
+ # more than two leading slashes shall be treated as a single slash.")
my $node = '';
- if ( $^O =~ m/^(?:qnx|nto)$/ && $path =~ s:^(//[^/]+)(/|\z):/:s ) {
+ if ( $^O =~ m/^(?:qnx|nto|cygwin)$/ && $path =~ s:^(//[^/]+)(/|\z):/:s ) {
$node = $1;
}
# This used to be