Fix: file module does not remove dangling symlinks

This commit is contained in:
Rafal Lewczuk 2012-05-03 01:09:56 +02:00 committed by Michael DeHaan
parent 06e99ee75e
commit 3de61fb180

View file

@ -290,7 +290,7 @@ def rmtree_error(func, path, exc_info):
# go...
prev_state = 'absent'
if os.path.exists(path):
if os.path.lexists(path):
if os.path.islink(path):
prev_state = 'link'
elif os.path.isfile(path):