Close readclosers returned by DecompressStream

Signed-off-by: genglu.gl <luzigeng32@163.com>
master
genglu.gl 2022-02-11 14:53:14 +08:00
parent 45fc3ed510
commit 13665367df
1 changed files with 1 additions and 0 deletions

View File

@ -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