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 cebba29fb6
commit b6be1f5128

2
file
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):