Commit dc4d589c by James Tanner

Fixes #4767 detect hard links and set state in add_file_info

parent f4b59fe2
......@@ -511,6 +511,8 @@ class AnsibleModule(object):
kwargs['state'] = 'link'
elif os.path.isdir(path):
kwargs['state'] = 'directory'
elif os.stat(path).st_nlink > 1:
kwargs['state'] = 'hard'
else:
kwargs['state'] = 'file'
if HAVE_SELINUX and self.selinux_enabled():
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment