diff options
author | coldWater <forsaken628@gmail.com> | 2024-03-19 03:20:36 +0100 |
---|---|---|
committer | Earl Warren <contact@earl-warren.org> | 2024-03-26 19:04:25 +0100 |
commit | 664052fb0b603f4d57ecde5e5740c9137f89005c (patch) | |
tree | d0ca95ed18b6afe8842193ce99a4a85887151284 /routers | |
parent | Remove unused error in graceful manager (#29871) (diff) | |
download | forgejo-664052fb0b603f4d57ecde5e5740c9137f89005c.tar.xz forgejo-664052fb0b603f4d57ecde5e5740c9137f89005c.zip |
Fix missing error check of bufio.Scanner (#29882)
maybe more
(cherry picked from commit 0e183d81fc5283f9d2047472de580e4f04a046c1)
Diffstat (limited to 'routers')
-rw-r--r-- | routers/web/repo/compare.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/routers/web/repo/compare.go b/routers/web/repo/compare.go index b0570f97c3..bf42b77b66 100644 --- a/routers/web/repo/compare.go +++ b/routers/web/repo/compare.go @@ -980,5 +980,9 @@ func getExcerptLines(commit *git.Commit, filePath string, idxLeft, idxRight, chu } diffLines = append(diffLines, diffLine) } + err = scanner.Err() + if err != nil { + return nil, fmt.Errorf("scan: %w", err) + } return diffLines, nil } |