Skip to content

Commit

Permalink
fix: 解决解压 mac 压缩文件失败的问题 (#879)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhengkunwang223 authored May 5, 2023
1 parent e672d1d commit 4063361
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions backend/utils/files/file_op.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 4063361

Please sign in to comment.