Path.rmtree() doesn't work on broken links as expected

Issue #3 resolved
Cesar Gasparri
created an issue

Path.rmtree() doesn't remove broken symbolic links (it does remove working links). Try this in a shell:

{{{ ln -s /tmp/unexistent-file broken-link python -c 'from unipath import Path; Path("broken-link").rmtree()' }}}

You'll find that "broken-link" is still there, i think this is a bug. While debugging i found that .exist() is being used instead of .lexist() somewhere in the library, but i didn't dig deeper because didn't have time.

Good luck and nice work, i like your lib.

Comments (2)

  1. Log in to comment