summaryrefslogtreecommitdiff
path: root/lib/File/Spec/Unix.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/File/Spec/Unix.pm')
-rw-r--r--lib/File/Spec/Unix.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/File/Spec/Unix.pm b/lib/File/Spec/Unix.pm
index 87ad643fe2..85df2c2d3b 100644
--- a/lib/File/Spec/Unix.pm
+++ b/lib/File/Spec/Unix.pm
@@ -41,7 +41,7 @@ ricochet (some scripts depend on it).
sub canonpath {
my ($self,$path,$reduce_ricochet) = @_;
- $path =~ s|/+|/|g unless($^O =~ /cygwin/); # xx////xx -> xx/xx
+ $path =~ s|/+|/|g unless($^O eq 'cygwin'); # xx////xx -> xx/xx
$path =~ s|(/\.)+/|/|g; # xx/././xx -> xx/xx
$path =~ s|^(\./)+|| unless $path eq "./"; # ./xx -> xx
$path =~ s|^/(\.\./)+|/|; # /../../xx -> xx