fix:解决新建文件夹部分权限无法创建的问题 (#4515)

This commit is contained in:
zhengkunwang 2024-04-15 15:08:10 +08:00 committed by GitHub
parent 4935d88301
commit fbd0e836d7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -54,7 +54,10 @@ func (f FileOp) GetContent(dst string) ([]byte, error) {
}
func (f FileOp) CreateDir(dst string, mode fs.FileMode) error {
return f.Fs.MkdirAll(dst, mode)
if err := f.Fs.MkdirAll(dst, mode); err != nil {
return err
}
return f.ChmodR(dst, int64(mode), true)
}
func (f FileOp) CreateFile(dst string) error {