summaryrefslogtreecommitdiff
path: root/lib/File
diff options
context:
space:
mode:
authorCraig A. Berry <craigberry@mac.com>2002-09-18 11:57:02 -0500
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2002-09-21 19:46:56 +0000
commit9ba1b7d248e0db6e26fa52ba8d5b3768aa0b633f (patch)
treee9d5de129e78646c7783d05fca6cefb6d5ed863b /lib/File
parent61074b56bec688db916ab8fff6f579810626a32e (diff)
downloadperl-9ba1b7d248e0db6e26fa52ba8d5b3768aa0b633f.tar.gz
file spec tweaks for VMS
From: "Craig A. Berry" <craigberry@mac.com> Message-ID: <3D88F6AE.3020708@mac.com> p4raw-id: //depot/perl@17913
Diffstat (limited to 'lib/File')
-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) {