From fbd0e836d7e53effcdd7a5727aaa7a2bf900789b Mon Sep 17 00:00:00 2001 From: zhengkunwang <31820853+zhengkunwang223@users.noreply.github.com> Date: Mon, 15 Apr 2024 15:08:10 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E8=A7=A3=E5=86=B3=E6=96=B0?= =?UTF-8?q?=E5=BB=BA=E6=96=87=E4=BB=B6=E5=A4=B9=E9=83=A8=E5=88=86=E6=9D=83?= =?UTF-8?q?=E9=99=90=E6=97=A0=E6=B3=95=E5=88=9B=E5=BB=BA=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98=20(#4515)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/utils/files/file_op.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/utils/files/file_op.go b/backend/utils/files/file_op.go index d1a526cc6..1bbd11601 100644 --- a/backend/utils/files/file_op.go +++ b/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 {