podman/pkg/machine/compression
Paul Holzinger f630eebcfa
pkg/machine/compression: skip decompress bar for empty file
When the file is empty it is possible our code panics as bar.ProxyReader
returns nil when the bar is finished which is the case for 0 size as it
doesn't have to read anything from there. However as this happens on
different goroutines it is race and most of the time still works.

To fix this simply skip the progress bar setup for empty files.

While at it fix the deprecated argument in the tests.

Fixes #23281

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-07-18 13:23:00 +02:00
..
testdata Better file close and err handling 2024-02-25 22:29:03 +01:00
compression_test.go Machine decompress.go refactoring follow-up 2024-03-13 00:58:50 +01:00
config.go zstd now default compression for podman machine 2024-02-20 14:26:41 -06:00
copy_test.go Vendor crc CopySparse 2024-02-09 19:33:56 +01:00
decompress.go pkg/machine/compression: skip decompress bar for empty file 2024-07-18 13:23:00 +02:00
generic.go Machine decompress.go refactoring follow-up 2024-03-13 00:58:50 +01:00
sparse_file_writer.go Avoid reliance on fs.ErrClosed in SparseWriter users 2024-03-07 14:46:12 +01:00
sparse_file_writer_test.go Avoid reliance on fs.ErrClosed in SparseWriter users 2024-03-07 14:46:12 +01:00
uncompressed.go Avoid reliance on fs.ErrClosed in SparseWriter users 2024-03-07 14:46:12 +01:00
zip.go Avoid reliance on fs.ErrClosed in SparseWriter users 2024-03-07 14:46:12 +01:00