summaryrefslogtreecommitdiff
path: root/lib/File
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-03-06 15:17:08 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-03-06 15:17:08 +0000
commit64f6ddac8f2e5d8da1212637449f0461b8b71a83 (patch)
tree0ced285609c6abb40cf23b40b8bd88392060540d /lib/File
parent5b67648c39436ab85446c7954c3782ff1757a3d2 (diff)
downloadperl-64f6ddac8f2e5d8da1212637449f0461b8b71a83.tar.gz
File::Path::rmtree() doesn't delete stale symlinks correctly
p4raw-id: //depot/perl@5581
Diffstat (limited to 'lib/File')
-rw-r--r--lib/File/Path.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/File/Path.pm b/lib/File/Path.pm
index 79fdfb6ca1..fb5377d6c1 100644
--- a/lib/File/Path.pm
+++ b/lib/File/Path.pm
@@ -205,7 +205,9 @@ sub rmtree {
}
else {
if ($safe &&
- ($Is_VMS ? !&VMS::Filespec::candelete($root) : !-w $root)) {
+ ($Is_VMS ? !&VMS::Filespec::candelete($root)
+ : !(-l $root || -w $root)))
+ {
print "skipped $root\n" if $verbose;
next;
}