1
0
mirror of https://github.com/1Panel-dev/1Panel.git synced 2025-01-31 14:08:06 +08:00

fix: 解决解压 mac 压缩文件失败的问题 (#879)

This commit is contained in:
zhengkunwang223 2023-05-05 14:50:52 +07:00 committed by GitHub
parent e672d1d896
commit 40633619ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -482,6 +482,9 @@ func (f FileOp) Decompress(srcFile string, dst string, cType CompressType) error
handler := func(ctx context.Context, archFile archiver.File) error {
info := archFile.FileInfo
if strings.HasPrefix(archFile.NameInArchive, "__MACOSX") {
return nil
}
filePath := filepath.Join(dst, archFile.NameInArchive)
if archFile.FileInfo.IsDir() {
if err := f.Fs.MkdirAll(filePath, info.Mode()); err != nil {