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

pull/880/head
zhengkunwang223 2 years ago committed by GitHub
parent e672d1d896
commit 40633619ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

Loading…
Cancel
Save