-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <[email protected]>
- Loading branch information
Showing
2 changed files
with
23 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters