From: Craig A. Berry Date: Fri, 31 Aug 2007 14:14:52 +0000 (+0000) Subject: Avoid infinite recursion in File::Path::_rmtree on VMS when there X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=463ea4b9ac9baea8f37871d557598d26c8e0b1e0;p=p5sagit%2Fp5-mst-13.2.git Avoid infinite recursion in File::Path::_rmtree on VMS when there is a file present with a single dot as the name. Reported by John Malmberg in <46D79A90.50405@qsl.net>. p4raw-id: //depot/perl@31775 --- diff --git a/lib/File/Path.pm b/lib/File/Path.pm index 37ec8ea..3857fd4 100644 --- a/lib/File/Path.pm +++ b/lib/File/Path.pm @@ -572,8 +572,11 @@ sub _rmtree { # Deleting large numbers of files from VMS Files-11 filesystems # is faster if done in reverse ASCIIbetical order - @files = reverse @files if $Is_VMS; - ($root = VMS::Filespec::unixify($root)) =~ s#\.dir\z## if $Is_VMS; + if ($Is_VMS) { + @files = reverse @files; + ($root = VMS::Filespec::unixify($root)) =~ s#\.dir\z##; + @files = map( $_ eq '.' ? '.;' : $_, @files ); + } if ($Is_MacOS) { @files = map("$root$_", @files); }