diff options
author | W. Phillip Moore <wpm@ms.com> | 1999-01-19 06:39:11 -0500 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 1999-01-21 15:24:10 +0000 |
commit | ee79a11f8a419928cb5e8233d259db457969889d (patch) | |
tree | f28c4dc4144984a1ff4f598f7ad376a89ef46fb8 | |
parent | f610777fe6e5155eff71b75c639bbca2c354315c (diff) | |
download | perl-ee79a11f8a419928cb5e8233d259db457969889d.tar.gz |
Re: [PATCH] File::Path 1.04 bug (all perl5 core versions)
To: Graham Barr <gbarr@ti.com>, perlbug@perl.org
Message-ID: <13988.46383.298992.97303@zappa>
p4raw-id: //depot/cfgperl@2666
-rw-r--r-- | lib/File/Path.pm | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/File/Path.pm b/lib/File/Path.pm index 225ecab4b6..a5c91feb54 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#/$##; |