Upgrade to PathTools-3.24.
[p5sagit/p5-mst-13.2.git] / lib / File / Spec / Cygwin.pm
index be457b1..7124706 100644 (file)
@@ -40,7 +40,13 @@ and then File::Spec::Unix canonpath() is called on the result.
 sub canonpath {
     my($self,$path) = @_;
     $path =~ s|\\|/|g;
-    return $self->SUPER::canonpath($path);
+
+    # Handle network path names beginning with double slash
+    my $node = '';
+    if ( $path =~ s@^(//[^/]+)(?:/|\z)@/@s ) {
+        $node = $1;
+    }
+    return $node . $self->SUPER::canonpath($path);
 }
 
 sub catdir {