summaryrefslogtreecommitdiff
path: root/lib/File/Spec/VMS.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/File/Spec/VMS.pm')
-rw-r--r--lib/File/Spec/VMS.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/File/Spec/VMS.pm b/lib/File/Spec/VMS.pm
index f21ff5ecee..54fcee15ec 100644
--- a/lib/File/Spec/VMS.pm
+++ b/lib/File/Spec/VMS.pm
@@ -164,6 +164,7 @@ sub canonpath {
$path =~ s/([\[<])(-+)/$1 . "\cx" x length($2)/e; # encode leading '-'s
$path =~ s/([\[<\.])([^\[<\.\cx]+)\.-\.?/$1/g; # bar.-.foo ==> foo
$path =~ s/([\[<])(\cx+)/$1 . '-' x length($2)/e; # then decode
+ $path =~ s/^[\[<\]>]{2}//; # []foo ==> foo
return $path;
}
}
@@ -211,7 +212,7 @@ VMS-syntax file specification.
sub catfile {
my ($self,@files) = @_;
- my $file = pop @files;
+ my $file = $self->canonpath(pop @files);
@files = grep($_,@files);
my $rslt;
if (@files) {