mirror of
				https://github.com/containers/podman.git
				synced 2025-10-30 09:25:59 +08:00 
			
		
		
		
	 5e0b7e54c0
			
		
	
	5e0b7e54c0
	
	
	
		
			
			Neither of the SparseWriter users actually _wants_ the underlying WriteSeeker to be closed; so, don't. That makes it clear where the responsibility for closing the file lies, and allows us to remove the reliance on the destinations reliably returning ErrClosed. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
		
			
				
	
	
		
			19 lines
		
	
	
		
			422 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
		
			422 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| package compression
 | |
| 
 | |
| import (
 | |
| 	"io"
 | |
| )
 | |
| 
 | |
| type uncompressedDecompressor struct {
 | |
| 	genericDecompressor
 | |
| }
 | |
| 
 | |
| func newUncompressedDecompressor(compressedFilePath string) (*uncompressedDecompressor, error) {
 | |
| 	d, err := newGenericDecompressor(compressedFilePath)
 | |
| 	return &uncompressedDecompressor{*d}, err
 | |
| }
 | |
| 
 | |
| func (d *uncompressedDecompressor) decompress(w io.WriteSeeker, r io.Reader) error {
 | |
| 	return d.sparseOptimizedCopy(w, r)
 | |
| }
 |