|
|
@ -61,15 +61,10 @@ class ActionModule(object):
|
|
|
|
result=dict(failed=True, msg="src and content are mutually exclusive")
|
|
|
|
result=dict(failed=True, msg="src and content are mutually exclusive")
|
|
|
|
return ReturnData(conn=conn, result=result)
|
|
|
|
return ReturnData(conn=conn, result=result)
|
|
|
|
|
|
|
|
|
|
|
|
# Check if the source ends with a "/" and
|
|
|
|
# Check if the source ends with a "/"
|
|
|
|
# expand any tildes that may be in the path
|
|
|
|
|
|
|
|
source_trailing_slash = False
|
|
|
|
source_trailing_slash = False
|
|
|
|
if source:
|
|
|
|
if source:
|
|
|
|
source_trailing_slash = source.endswith("/")
|
|
|
|
source_trailing_slash = source.endswith("/")
|
|
|
|
source = os.path.expanduser(source)
|
|
|
|
|
|
|
|
# And expand the path for the destination
|
|
|
|
|
|
|
|
if dest:
|
|
|
|
|
|
|
|
dest = os.path.expanduser(dest)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Define content_tempfile in case we set it after finding content populated.
|
|
|
|
# Define content_tempfile in case we set it after finding content populated.
|
|
|
|
content_tempfile = None
|
|
|
|
content_tempfile = None
|
|
|
|