mirror of
https://codeberg.org/forgejo/forgejo
synced 2024-11-29 05:06:11 +01:00
Check error in GetRepoFileContent for io.ReadAll
This commit is contained in:
parent
1d3240887c
commit
781a37fbe1
|
@ -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