summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToshio Kuratomi <toshio@fedoraproject.org>2014-11-19 13:04:44 -0800
committerToshio Kuratomi <toshio@fedoraproject.org>2014-11-19 13:04:44 -0800
commit19b328c4df2157b6c0191e9144236643ce2be890 (patch)
tree6fb3a0d1957394670ceb4bf057beb08c4b5a8b6e
parentc46f39f0442ecaaa5eec60d8d895ee80ff7ba656 (diff)
downloadansible-modules-core-19b328c4df2157b6c0191e9144236643ce2be890.tar.gz
Cannot readlink() on a hard link
-rw-r--r--files/file.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/files/file.py b/files/file.py
index be7b05aa..7aa5e45d 100644
--- a/files/file.py
+++ b/files/file.py
@@ -170,7 +170,7 @@ def main():
src = os.path.expanduser(src)
else:
if state in ['link','hard']:
- if follow:
+ if follow and state == 'link':
# use the current target of the link as the source
src = os.readlink(path)
else: