fix: 网元文件获取改用find读取避免Argument list too long错误

This commit is contained in:
TsMask
2024-10-08 16:33:43 +08:00
parent d0f946cc85
commit 4267c7df9d
3 changed files with 27 additions and 25 deletions

View File

@@ -188,7 +188,7 @@ func (r *TraceTaskHlr) File(traceId, dirPath string) ([]map[string]any, error) {
// 获取文件列表
fileName := fmt.Sprintf("%s_%s", neInfo.NeName, traceId)
_, rows, err := ssh.FileList(sshClient, filepath.ToSlash(dirPath), fileName)
rows, err := ssh.FileList(sshClient, filepath.ToSlash(dirPath), fileName)
if err != nil {
hlrItem["err"] = "file not found"
hlrList = append(hlrList, hlrItem)