diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/File/Spec/Unix.pm | 8 |
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 |