From: Gurusamy Sarathy Date: Mon, 6 Mar 2000 15:17:08 +0000 (+0000) Subject: File::Path::rmtree() doesn't delete stale symlinks correctly X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=64f6ddac8f2e5d8da1212637449f0461b8b71a83;p=p5sagit%2Fp5-mst-13.2.git File::Path::rmtree() doesn't delete stale symlinks correctly p4raw-id: //depot/perl@5581 --- diff --git a/lib/File/Path.pm b/lib/File/Path.pm index 79fdfb6..fb5377d 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; }