◐ Shell
clean mode source ↗

Message 58900 - Python tracker

> While we are removing the contents of the target directory as expected,

This is not what I expected at all. I expected the function to fail,
because the target was not a directory, just a symlink to a directory.
That, or behavior similar to the command "rm -rf" which only removes the
symlink, but not the contents.

The current behavior is in my opinion inconsistent; if the symlink is
treated as a normal directory, it should also get deleted.

As I said, if the current behavior is apparently expected, it should be
documented, because I can think of no program that follow symlinks while
deleting unless specifically instructed to.