diff --git a/tuf/ngclient/updater.py b/tuf/ngclient/updater.py index a3477321..08cab467 100644 --- a/tuf/ngclient/updater.py +++ b/tuf/ngclient/updater.py @@ -337,6 +337,7 @@ def download_target( target_file.seek(0) with open(filepath, "wb") as destination_file: + _lock_file(destination_file) shutil.copyfileobj(target_file, destination_file) logger.debug("Downloaded target %s", targetinfo.path)