From 0ad3d51e5a51ccf8e45d238933c768001519195d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miloslav=20Trma=C4=8D?= Date: Tue, 6 May 2025 22:36:26 +0200 Subject: [PATCH] Don't document the precise file position of a returned file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The callers don't really need to know, and this way we don't need to get the details of the syntax correct. Should not change behavior. Signed-off-by: Miloslav Trmač --- storage/pkg/chunked/compression_linux.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/storage/pkg/chunked/compression_linux.go b/storage/pkg/chunked/compression_linux.go index 3fbd5ee7c7..4727199454 100644 --- a/storage/pkg/chunked/compression_linux.go +++ b/storage/pkg/chunked/compression_linux.go @@ -182,8 +182,8 @@ func openTmpFileNoTmpFile(tmpDir string) (*os.File, error) { // readZstdChunkedManifest reads the zstd:chunked manifest from the seekable stream blobStream. // tmpDir is a directory where the tar-split temporary file is written to. The file is opened with // O_TMPFILE so that it is automatically removed when it is closed. -// Returns (manifest blob, parsed manifest, tar-split file or nil, manifest offset). The opened tar-split file -// points to the end of the file (equivalent to Seek(0, 2)). +// Returns (manifest blob, parsed manifest, tar-split file or nil, manifest offset). +// The opened tar-split file’s position is unspecified. // It may return an error matching ErrFallbackToOrdinaryLayerDownload / errFallbackCanConvert. func readZstdChunkedManifest(tmpDir string, blobStream ImageSourceSeekable, tocDigest digest.Digest, annotations map[string]string) (_ []byte, _ *minimal.TOC, _ *os.File, _ int64, retErr error) { offsetMetadata := annotations[minimal.ManifestInfoKey]