fix: not such directory issue
This commit is contained in:
@@ -73,8 +73,9 @@ func (m *FileExport) GetFileList(c *gin.Context) {
|
|||||||
|
|
||||||
files, err := file.GetFileInfo(querys.Path, querys.Suffix)
|
files, err := file.GetFileInfo(querys.Path, querys.Suffix)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error(err)
|
log.Error("failed to GetFileInfo:", err)
|
||||||
c.JSON(http.StatusInternalServerError, services.ErrResp(err.Error()))
|
c.JSON(http.StatusInternalServerError, services.ErrResp(err.Error()))
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// split files list
|
// split files list
|
||||||
@@ -98,7 +99,7 @@ func (m *FileExport) Total(c *gin.Context) {
|
|||||||
|
|
||||||
fileCount, dirCount, err := file.GetFileAndDirCount(dir)
|
fileCount, dirCount, err := file.GetFileAndDirCount(dir)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error(err)
|
log.Error("failed to GetFileAndDirCount:", err)
|
||||||
c.JSON(http.StatusInternalServerError, services.ErrResp(err.Error()))
|
c.JSON(http.StatusInternalServerError, services.ErrResp(err.Error()))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user