Prevent error if module.params['path'] has no path included. (#50106)

This commit is contained in:
Felix Fontein 2018-12-20 17:47:26 +01:00 committed by ansibot
parent 01a1ce16ce
commit f55481863d

View file

@ -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,