summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjctanner <tanner.jc@gmail.com>2016-11-21 09:05:53 -0500
committerToshio Kuratomi <a.badger@gmail.com>2016-11-21 07:20:11 -0800
commit663ba5275a9a0ba9ca65709b4ea24469e3efb501 (patch)
treee3178f4d6df4760f76947a21e888a49cd0a013e7
parentd026a488e6ba91083e8a84e80331dac49ad26e09 (diff)
downloadansible-modules-core-663ba5275a9a0ba9ca65709b4ea24469e3efb501.tar.gz
Set b_src to abspath of b_path so that symlinks work again. (#5678)
Fixes #5653 (cherry picked from commit 3acd6f45194e6248518aee6d600798c8d0d57b4d)
-rw-r--r--files/file.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/files/file.py b/files/file.py
index f19a9635..aa63194a 100644
--- a/files/file.py
+++ b/files/file.py
@@ -217,6 +217,7 @@ def main():
if follow and state == 'link':
# use the current target of the link as the source
src = to_native(os.path.realpath(b_path), errors='strict')
+ b_src = to_bytes(os.path.realpath(b_path), errors='strict')
else:
module.fail_json(msg='src and dest are required for creating links')