mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-25 20:22:45 +01:00
Check error in GetRepoFileContent for io.ReadAll
This commit is contained in:
parent
1d3240887c
commit
781a37fbe1
1 changed files with 4 additions and 1 deletions
|
@ -87,7 +87,10 @@ func ProcessorHelper() *markup.ProcessorHelper {
|
|||
}
|
||||
defer dataRc.Close()
|
||||
|
||||
buf, _ := io.ReadAll(dataRc)
|
||||
buf, err := io.ReadAll(dataRc)
|
||||
if err != nil {
|
||||
log.Error("failed to completly read blob for %-v:%s. Error: %v", repo, filePath, err)
|
||||
}
|
||||
|
||||
fileContent, _, err := highlight.File(blob.Name(), language, buf)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in a new issue