Co-authored-by: haoran.ren <haoran.ren@mihoyo.com>
@@ -426,7 +426,6 @@ func gzipFile(file string) error {
if err != nil {
return err
}
- defer in.Close()
out, err := os.Create(fmt.Sprintf("%s%s", file, gzipExt))
@@ -441,5 +440,7 @@ func gzipFile(file string) error {
+ in.Close()
+
return os.Remove(file)