develooper Front page | perl.perl5.changes | Postings from November 2007

Change 32276: Make File::Path::_rmtree behave when passed an individual file

From:
Craig A . Berry
Date:
November 11, 2007 15:00
Subject:
Change 32276: Make File::Path::_rmtree behave when passed an individual file
Message ID:
20071111230006.8918421C6A8@mx.activestate.com
Change 32276 by craigb@craigb-brianor on 2007/11/11 22:52:15

	Make File::Path::_rmtree behave when passed an individual file
	with a relative path that is already in VMS syntax.

Affected files ...

... //depot/perl/lib/File/Path.pm#57 edit

Differences ...

==== //depot/perl/lib/File/Path.pm#57 (text) ====
Index: perl/lib/File/Path.pm
--- perl/lib/File/Path.pm#56~32186~	2007-10-24 06:43:17.000000000 -0700
+++ perl/lib/File/Path.pm	2007-11-11 14:52:15.000000000 -0800
@@ -17,7 +17,7 @@
 
 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 @@
             # 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)
End of Patch.



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About