fix: 日志文件查询解析异常7位

This commit is contained in:
TsMask
2023-12-14 19:18:53 +08:00
parent 85e8ac3e34
commit 5f410f4203

View File

@@ -68,11 +68,17 @@ func FileList(path, neIp, search string) (string, []FileListRow, error) {
// 使用空格对字符串进行切割
fields := strings.Fields(rowStr)
// 无查询过滤会有total总计
if i == 0 && searchStr == "" {
totalSize = fields[1]
continue
}
// 拆分不足7位跳过
if len(fields) != 7 {
continue
}
// 文件类型
fileMode := fields[0]
fileType := "file"