mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
Force download if checksums do not match (#4262)
This commit is contained in:
committed by
Matt Clay
parent
b87ef7772f
commit
3366a95765
@@ -364,6 +364,11 @@ def main():
|
||||
mtime = os.path.getmtime(dest)
|
||||
last_mod_time = datetime.datetime.utcfromtimestamp(mtime)
|
||||
|
||||
# If the checksum does not match we have to force the download
|
||||
# because last_mod_time may be newer than on remote
|
||||
if checksum_mismatch:
|
||||
force = True
|
||||
|
||||
# download to tmpsrc
|
||||
tmpsrc, info = url_get(module, url, dest, use_proxy, last_mod_time, force, timeout, headers, tmp_dest)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user