File::Spec fixes from Jan Dubois <jan.dubois@ibm.net>
[p5sagit/p5-mst-13.2.git] / lib / File / Spec / Win32.pm
index 0e00af7..0ea4970 100644 (file)
@@ -99,7 +99,7 @@ sub canonpath {
     my ($self,$path,$reduce_ricochet) = @_;
     $path =~ s/^([a-z]:)/\u$1/;
     $path =~ s|/|\\|g;
-    $path =~ s|([^\\])\\+|\1\\|g;                  # xx////xx  -> xx/xx
+    $path =~ s|([^\\])\\+|$1\\|g;                  # xx////xx  -> xx/xx
     $path =~ s|(\\\.)+\\|\\|g;                     # xx/././xx -> xx/xx
     $path =~ s|^(\.\\)+|| unless $path eq ".\\";   # ./xx      -> xx
     $path =~ s|\\$||