summaryrefslogtreecommitdiff
path: root/lib/File/Spec/Cygwin.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/File/Spec/Cygwin.pm')
-rw-r--r--lib/File/Spec/Cygwin.pm12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/File/Spec/Cygwin.pm b/lib/File/Spec/Cygwin.pm
index 19a2937c6b..be457b1620 100644
--- a/lib/File/Spec/Cygwin.pm
+++ b/lib/File/Spec/Cygwin.pm
@@ -43,6 +43,18 @@ sub canonpath {
return $self->SUPER::canonpath($path);
}
+sub catdir {
+ my $self = shift;
+
+ # Don't create something that looks like a //network/path
+ if ($_[0] eq '/' or $_[0] eq '\\') {
+ shift;
+ return $self->SUPER::catdir('', @_);
+ }
+
+ $self->SUPER::catdir(@_);
+}
+
=pod
=item file_name_is_absolute