Browse Source

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

pull/4520/head
zhengkunwang 7 months ago committed by GitHub
parent
commit
fbd0e836d7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 5
      backend/utils/files/file_op.go

5
backend/utils/files/file_op.go

@ -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 {

Loading…
Cancel
Save