Integrate with Sarathy.
[p5sagit/p5-mst-13.2.git] / lib / File / Path.pm
index 79fdfb6..46f360a 100644 (file)
@@ -73,7 +73,7 @@ than VMS is settled.  (defaults to FALSE)
 =back
 
 It returns the number of files successfully deleted.  Symlinks are
-treated as ordinary files.
+simply deleted and not followed.
 
 B<NOTE:> If the third parameter is not TRUE, C<rmtree> is B<unsecure>
 in the face of failure or interruption.  Files and directories which
@@ -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;
            }