From 5f521e6c92d822ee2344c4ad02d7f804d7d858db Mon Sep 17 00:00:00 2001 From: zhengkunwang223 Date: Wed, 29 May 2024 17:58:50 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3=E6=89=93=E5=BC=80?= =?UTF-8?q?=E9=9D=9E=E6=96=87=E6=9C=AC=E6=96=87=E4=BB=B6=E6=8A=A5=E9=94=99?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/service/file.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/app/service/file.go b/backend/app/service/file.go index 256f3a3c1cc5..44a872107c04 100644 --- a/backend/app/service/file.go +++ b/backend/app/service/file.go @@ -231,6 +231,9 @@ func (f *FileService) GetContent(op request.FileContentReq) (response.FileInfo, Path: op.Path, Expand: true, }) + if err != nil { + return response.FileInfo{}, err + } content := []byte(info.Content) var decodeName string @@ -248,9 +251,6 @@ func (f *FileService) GetContent(op request.FileContentReq) (response.FileInfo, } info.Content = string(contents) } - if err != nil { - return response.FileInfo{}, err - } return response.FileInfo{FileInfo: *info}, nil }