mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
original basename minus src
This commit is contained in:
@@ -191,11 +191,10 @@ def additional_parameter_handling(params):
|
|||||||
if (params['state'] not in ("link", "absent") and os.path.isdir(to_bytes(params['path'], errors='surrogate_or_strict'))):
|
if (params['state'] not in ("link", "absent") and os.path.isdir(to_bytes(params['path'], errors='surrogate_or_strict'))):
|
||||||
basename = None
|
basename = None
|
||||||
|
|
||||||
# _original_basename is used by other modules that depend on file
|
# _original_basename is used by other modules that depend on file to construct a correct
|
||||||
|
# destination path when the destination path was a directory
|
||||||
if params['_original_basename']:
|
if params['_original_basename']:
|
||||||
basename = params['_original_basename']
|
basename = params['_original_basename']
|
||||||
#elif params['src'] is not None:
|
|
||||||
# basename = os.path.basename(params['src'])
|
|
||||||
|
|
||||||
if basename:
|
if basename:
|
||||||
params['path'] = params['path'] = os.path.join(params['path'], basename)
|
params['path'] = params['path'] = os.path.join(params['path'], basename)
|
||||||
|
|||||||
Reference in New Issue
Block a user