mirror of
https://github.com/containers/podman.git
synced 2025-10-16 10:43:52 +08:00
Add a comment to explain why we look at file name for zip files
Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
This commit is contained in:
@ -34,6 +34,8 @@ func newDecompressor(compressedFilePath string, compressedFileContent []byte) de
|
||||
switch {
|
||||
case compressionType == archive.Xz:
|
||||
return newXzDecompressor(compressedFilePath)
|
||||
// Zip files are not guaranteed to have a magic number at the beginning
|
||||
// of the file, so we need to use the file name to detect them.
|
||||
case compressionType == archive.Uncompressed && hasZipSuffix:
|
||||
return newZipDecompressor(compressedFilePath)
|
||||
case compressionType == archive.Uncompressed:
|
||||
|
Reference in New Issue
Block a user