mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 05:10:22 -07:00
original basename minus src
This commit is contained in:
parent
20b9ca6e7c
commit
021f33e063
1 changed files with 2 additions and 3 deletions
|
@ -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)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue