From 1248d2ce8a3f1b0626a0189cc468c5473e31b699 Mon Sep 17 00:00:00 2001 From: James Cammarata Date: Wed, 21 May 2014 12:48:27 -0500 Subject: [PATCH] Fixing absolute path calculation for file module when linking Fixes #7403 --- library/files/file | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/files/file b/library/files/file index d758d54b8cc..1306ef5f0ab 100644 --- a/library/files/file +++ b/library/files/file @@ -184,7 +184,7 @@ def main(): absrc = src if not os.path.isabs(absrc): - absrc = os.path.normpath('%s/%s' % (os.path.dirname(path), absrc)) + absrc = os.path.abspath(src) if not os.path.exists(absrc) and not force: module.fail_json(path=path, src=src, msg='src file does not exist, use "force=yes" if you really want to create the link: %s' % absrc)