diff --git a/lib/ansible/plugins/action/copy.py b/lib/ansible/plugins/action/copy.py index 715d8830578..1474e476ca2 100644 --- a/lib/ansible/plugins/action/copy.py +++ b/lib/ansible/plugins/action/copy.py @@ -90,7 +90,7 @@ class ActionModule(ActionBase): if os.path.isdir(source): # Get the amount of spaces to remove to get the relative path. if source_trailing_slash: - sz = len(source) + sz = len(source) + 1 else: sz = len(source.rsplit('/', 1)[0]) + 1