1
1
mirror of https://github.com/go-gitea/gitea synced 2025-11-01 20:08:25 +00:00

Refactor sha1 and time-limited code (#31023) (#31030)

Backport #31023 by wxiaoguang

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
Giteabot
2024-05-21 00:58:21 +08:00
committed by GitHub
parent 8a259e54c5
commit 55cb356b84
8 changed files with 120 additions and 96 deletions

View File

@@ -931,7 +931,7 @@ func ExcerptBlob(ctx *context.Context) {
}
}
ctx.Data["section"] = section
ctx.Data["FileNameHash"] = base.EncodeSha1(filePath)
ctx.Data["FileNameHash"] = git.HashFilePathForWebUI(filePath)
ctx.Data["AfterCommitID"] = commitID
ctx.Data["Anchor"] = anchor
ctx.HTML(http.StatusOK, tplBlobExcerpt)