summaryrefslogtreecommitdiff
path: root/lib/File
diff options
context:
space:
mode:
authorCraig A. Berry <craigberry@mac.com>2007-11-11 22:52:15 +0000
committerCraig A. Berry <craigberry@mac.com>2007-11-11 22:52:15 +0000
commit8b0a9f85d7b999dff48068c7e22d7373b0779100 (patch)
treebfff904e300344b1eed1a5433fee357ba003d156 /lib/File
parent01523419c4975d14e4e5f85345c082d2525fd1a2 (diff)
downloadperl-8b0a9f85d7b999dff48068c7e22d7373b0779100.tar.gz
Make File::Path::_rmtree behave when passed an individual file
with a relative path that is already in VMS syntax. p4raw-id: //depot/perl@32276
Diffstat (limited to 'lib/File')
-rw-r--r--lib/File/Path.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/File/Path.pm b/lib/File/Path.pm
index 13918e22cc..031430abb9 100644
--- a/lib/File/Path.pm
+++ b/lib/File/Path.pm
@@ -17,7 +17,7 @@ BEGIN {
use Exporter ();
use vars qw($VERSION @ISA @EXPORT);
-$VERSION = '2.02';
+$VERSION = '2.02_01';
@ISA = qw(Exporter);
@EXPORT = qw(mkpath rmtree);
@@ -340,7 +340,9 @@ sub _rmtree {
# not a directory
$root = VMS::Filespec::vmsify("./$root")
- if $Is_VMS && !File::Spec->file_name_is_absolute($root);
+ if $Is_VMS
+ && !File::Spec->file_name_is_absolute($root)
+ && ($root !~ m/(?<!\^)[\]>]+/); # not already in VMS syntax
if ($arg->{safe} &&
($Is_VMS ? !&VMS::Filespec::candelete($root)