From: W. Phillip Moore Date: Tue, 19 Jan 1999 11:39:11 +0000 (-0500) Subject: Re: [PATCH] File::Path 1.04 bug (all perl5 core versions) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ee79a11f8a419928cb5e8233d259db457969889d;p=p5sagit%2Fp5-mst-13.2.git Re: [PATCH] File::Path 1.04 bug (all perl5 core versions) To: Graham Barr , perlbug@perl.org Message-ID: <13988.46383.298992.97303@zappa> p4raw-id: //depot/cfgperl@2666 --- diff --git a/lib/File/Path.pm b/lib/File/Path.pm index 225ecab..a5c91fe 100644 --- a/lib/File/Path.pm +++ b/lib/File/Path.pm @@ -148,10 +148,17 @@ sub rmtree { my($roots, $verbose, $safe) = @_; my(@files); my($count) = 0; - $roots = [$roots] unless ref $roots; $verbose ||= 0; $safe ||= 0; + if ( defined($roots) && length($roots) ) { + $roots = [$roots] unless ref $roots; + } + else { + carp "No root path(s) specified\n"; + return 0; + } + my($root); foreach $root (@{$roots}) { $root =~ s#/$##;