From: Dominic Dunlop Date: Thu, 10 Sep 1998 11:02:46 +0000 (+0000) Subject: MM_Unix::canonpath erroneously turns leading // into / X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9204dbe03b8f6d4c97f3fb58d90b6df59cc355a1;p=p5sagit%2Fp5-mst-13.2.git MM_Unix::canonpath erroneously turns leading // into / Message-Id: p4raw-id: //depot/perl@1885 --- diff --git a/lib/ExtUtils/MM_Unix.pm b/lib/ExtUtils/MM_Unix.pm index 1b2e354..5f93fbc 100644 --- a/lib/ExtUtils/MM_Unix.pm +++ b/lib/ExtUtils/MM_Unix.pm @@ -84,10 +84,10 @@ sub canonpath { if ( $^O eq 'qnx' && $path =~ s|^(//\d+)/|/| ) { $node = $1; } - $path =~ s|/+|/|g ; # xx////xx -> xx/xx + $path =~ s|(?<=[^/])/+|/|g ; # xx////xx -> xx/xx $path =~ s|(/\.)+/|/|g ; # xx/././xx -> xx/xx $path =~ s|^(\./)+|| unless $path eq "./"; # ./xx -> xx - $path =~ s|/$|| unless $path eq "/"; # xx/ -> xx + $path =~ s|(?<=[^/])/$|| ; # xx/ -> xx "$node$path"; }