From 6cb8a257d9e8d56a1db13acc75e9a150781ebfc4 Mon Sep 17 00:00:00 2001 From: jonnnh Date: Wed, 14 Aug 2019 15:35:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=A7=A3=E5=8E=8B=E7=BC=A9?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E6=9D=83=E9=99=90=E9=BB=98=E8=AE=A4=E4=B8=BA?= =?UTF-8?q?0666=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/utils/file.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/utils/file.go b/backend/utils/file.go index 6d4bcd9f..9a4300a1 100644 --- a/backend/utils/file.go +++ b/backend/utils/file.go @@ -106,7 +106,7 @@ func DeCompress(srcFile *os.File, dstPath string) error { } // 创建新文件 - newFile, err := os.Create(filepath.Join(dstPath, innerFile.Name)) + newFile, err := os.OpenFile(filepath.Join(dstPath, innerFile.Name), os.O_RDWR|os.O_CREATE|os.O_TRUNC, info.Mode()) if err != nil { log.Errorf("Unzip File Error : " + err.Error()) debug.PrintStack()