mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-04 20:32:45 +00:00
Make 'fetch' test for local directories before creating. Fixes issue #450
This commit is contained in:
@@ -481,7 +481,8 @@ class Runner(object):
|
||||
|
||||
if remote_md5 != local_md5:
|
||||
# create the containing directories, if needed
|
||||
os.makedirs(os.path.dirname(dest))
|
||||
if not os.path.isdir(os.path.dirname(dest)):
|
||||
os.makedirs(os.path.dirname(dest))
|
||||
|
||||
# fetch the file and check for changes
|
||||
conn.fetch_file(source, dest)
|
||||
|
||||
Reference in New Issue
Block a user