鏡像自
https://github.com/go-gitea/gitea
已同步 2025-12-07 13:28:25 +00:00
Refactor packages (func name & UI) (#34773)
1. Use `OpenXxx` instead of `GetXxx` because the returned readers should be correctly closed, and clarify the behaviors of the functions: they increase the download counter 2. Use `packages-content` styles instead of `issue-content`
此提交包含在:
@@ -513,9 +513,9 @@ func DownloadPackageFile(ctx *context.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
s, u, _, err := packages_service.GetPackageFileStream(ctx, pf)
|
||||
s, u, _, err := packages_service.OpenFileForDownload(ctx, pf)
|
||||
if err != nil {
|
||||
ctx.ServerError("GetPackageFileStream", err)
|
||||
ctx.ServerError("OpenFileForDownload", err)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
新增問題並參考
封鎖使用者