diff --git a/src/taskgraph/run-task/fetch-content b/src/taskgraph/run-task/fetch-content index 6c8390f8c..6adb2efbf 100755 --- a/src/taskgraph/run-task/fetch-content +++ b/src/taskgraph/run-task/fetch-content @@ -642,6 +642,10 @@ def extract_stream(reader, dest_dir): # See extract_archive. reader.forget() TarFile.open(fileobj=ifh, mode="r|").extractall(str(dest_dir)) + # tarfile stops at the end-of-archive marker, which can leave the + # end of the compressed stream, and its checksum, unread. + while ifh.read(CHUNK_SIZE): + pass elif magic == ZSTD_MAGIC and shutil.which("zstd"): # Not tar --use-compress-program: when reading from stdin, tar relays # it to the decompressor in small blocks, which is several times