修改解压缩文件权限默认为0666的问题

This commit is contained in:
jonnnh
2019-08-14 15:35:08 +08:00
parent 9f3f8e5c12
commit 6cb8a257d9

View File

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