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

pull/50211/head
Felix Fontein 6 years ago committed by ansibot
parent 01a1ce16ce
commit f55481863d

@ -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…
Cancel
Save