Prevent error if module.params['path'] has no path included. (#50106)
This commit is contained in:
parent
01a1ce16ce
commit
f55481863d
1 changed files with 1 additions and 1 deletions
|
@ -272,7 +272,7 @@ def main():
|
|||
)
|
||||
|
||||
# Check if Path exists
|
||||
base_dir = os.path.dirname(module.params['path'])
|
||||
base_dir = os.path.dirname(module.params['path']) or '.'
|
||||
if not os.path.isdir(base_dir):
|
||||
module.fail_json(
|
||||
name=base_dir,
|
||||
|
|
Loading…
Reference in a new issue