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