[Pharo-dev] DeleteVisitor and symbolic links

Alistair Grant akgrant0710 at gmail.com
Wed Feb 13 12:54:21 EST 2019

Hi Everyone,

I inadvertantly changed the behaviour of DeleteVisitor in Pharo 8.
In Pharo 7 DeleteVisitor will follow all symbolic links when deleting a
directory tree.  This has two consequences:

- A symbolic link that points to its containing directory will result in
  an infinite loop.
- Files may be deleted that are NOT subdirectories of the root

The Pharo 8 behaviour of not following symbolic links is how the linux
'rm -r' command behaves, and how I think DeleteVisitor should behave.

As Sean commented in
following symbolic links can lead to unexpected behaviour, deleting
files out of the tree, and thus is quite dangerous.

But since it is a change in existing behaviour, I wanted to let everyone
know in case there's something I haven't thought of.

I'll submit a PR that updates the appropriate method and class comments
in a few days.


More information about the Pharo-dev mailing list