Close readclosers returned by DecompressStream
Signed-off-by: genglu.gl <luzigeng32@163.com>master
parent
45fc3ed510
commit
13665367df
|
@ -55,6 +55,7 @@ func isArchivePath(path string) bool {
|
|||
if err != nil {
|
||||
return false
|
||||
}
|
||||
defer rdr.Close()
|
||||
r := tar.NewReader(rdr)
|
||||
_, err = r.Next()
|
||||
return err == nil
|
||||
|
|
Loading…
Reference in New Issue