From: Michael A Chase Date: Mon, 6 May 2002 13:58:48 +0000 (-0700) Subject: [ID 20020506.009] File::Spec::Unix::canonpath under cygwin X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=04ca015e83d9ca4de9e8d903a6e95460b4053132;p=p5sagit%2Fp5-mst-13.2.git [ID 20020506.009] File::Spec::Unix::canonpath under cygwin Message-Id: (plus add what POSIX says) p4raw-id: //depot/perl@16444 --- diff --git a/lib/File/Spec/Unix.pm b/lib/File/Spec/Unix.pm index 49c522a..c3e61d8 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