mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
Expand user in path, fix #385
This commit is contained in:
committed by
Matt Clay
parent
0243eec2a6
commit
298e782ff7
@@ -130,6 +130,7 @@ def main():
|
|||||||
# Create type object as namespace for module params
|
# Create type object as namespace for module params
|
||||||
p = type('Params', (), module.params)
|
p = type('Params', (), module.params)
|
||||||
|
|
||||||
|
p.src = os.path.expanduser(p.src)
|
||||||
if not os.access(p.src, R_OK):
|
if not os.access(p.src, R_OK):
|
||||||
module.fail_json(msg="src %s doesn't exist or not readable" % (p.src))
|
module.fail_json(msg="src %s doesn't exist or not readable" % (p.src))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user