summaryrefslogtreecommitdiff
path: root/lib/File
diff options
context:
space:
mode:
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;
}