fix: 修复压缩包解压时可能的由于父目录不存在导致的解压失败的问题 (#2099)

Co-authored-by: allyxmiko-server <allyxmiko@gmail.com>
pull/2102/head
Allyx 1 year ago committed by GitHub
parent b55b930353
commit b54c79e196
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -518,6 +518,13 @@ func (f FileOp) Decompress(srcFile string, dst string, cType CompressType) error
return err
}
return nil
} else {
parentDir := path.Dir(filePath)
if !f.Stat(parentDir) {
if err := f.Fs.MkdirAll(parentDir, info.Mode()); err != nil {
return err
}
}
}
fr, err := archFile.Open()
if err != nil {

Loading…
Cancel
Save