From c6c8a73be6616bc8b5096c4aa2c2aaabac5f0789 Mon Sep 17 00:00:00 2001 From: zhoupzh Date: Thu, 27 Oct 2022 17:10:40 +0800 Subject: [PATCH] fix issue --- routers/api/v1/repo/cloudbrain.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/routers/api/v1/repo/cloudbrain.go b/routers/api/v1/repo/cloudbrain.go index 17de648e5..7cfa15540 100755 --- a/routers/api/v1/repo/cloudbrain.go +++ b/routers/api/v1/repo/cloudbrain.go @@ -725,10 +725,10 @@ func getLogFromModelDir(jobName string, startLine int, endLine int, resultPath s line, error := r.ReadString('\n') if error == io.EOF { if i >= startLine { - fileEndLine = i re = re + line count++ } + fileEndLine = i+1 log.Info("read file completed.") break } @@ -738,12 +738,11 @@ func getLogFromModelDir(jobName string, startLine int, endLine int, resultPath s } if error == nil { if i >= startLine { - fileEndLine = i + fileEndLine = i+1 re = re + line count++ } } - fileEndLine = fileEndLine + 1 } } else {