From 46f5b75f9525af5abaed76c1f2c096c7d68b7a38 Mon Sep 17 00:00:00 2001 From: simonzhangsz Date: Fri, 6 Sep 2024 12:02:31 +0800 Subject: [PATCH] fix: not such directory issue --- features/lm/file_export/controller.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/features/lm/file_export/controller.go b/features/lm/file_export/controller.go index 5fba6abb..9ce7fdff 100644 --- a/features/lm/file_export/controller.go +++ b/features/lm/file_export/controller.go @@ -73,8 +73,9 @@ func (m *FileExport) GetFileList(c *gin.Context) { files, err := file.GetFileInfo(querys.Path, querys.Suffix) if err != nil { - log.Error(err) + log.Error("failed to GetFileInfo:", err) c.JSON(http.StatusInternalServerError, services.ErrResp(err.Error())) + return } // split files list @@ -98,7 +99,7 @@ func (m *FileExport) Total(c *gin.Context) { fileCount, dirCount, err := file.GetFileAndDirCount(dir) if err != nil { - log.Error(err) + log.Error("failed to GetFileAndDirCount:", err) c.JSON(http.StatusInternalServerError, services.ErrResp(err.Error())) return }