mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-08 03:33:10 +00:00
Fix: file module does not remove dangling symlinks
This commit is contained in:
committed by
Michael DeHaan
parent
06e99ee75e
commit
3de61fb180
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user