fix: not such directory issue

This commit is contained in:
2024-09-06 12:02:31 +08:00
parent 4ddf6db122
commit 46f5b75f95

View File

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