From: Craig A. Berry Date: Sun, 11 Nov 2007 22:52:15 +0000 (+0000) Subject: Make File::Path::_rmtree behave when passed an individual file X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8b0a9f85d7b999dff48068c7e22d7373b0779100;p=p5sagit%2Fp5-mst-13.2.git 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 --- diff --git a/lib/File/Path.pm b/lib/File/Path.pm index 13918e2..031430a 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)