mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 10:18:38 +00:00
Fix incorrect file links (#34189)
Fix #34188 The name "FileName" is ambiguous: sometimes it is "base name without path", sometimes it is "full name with path". The ambiguous name causes various problems. This PR clarifies the usage: `FileTreePath`: the full name with path.
This commit is contained in:
@@ -162,7 +162,7 @@ func prepareToRenderReadmeFile(ctx *context.Context, subfolder string, readmeFil
|
||||
defer dataRc.Close()
|
||||
|
||||
ctx.Data["FileIsText"] = fInfo.isTextFile
|
||||
ctx.Data["FileName"] = path.Join(subfolder, readmeFile.Name())
|
||||
ctx.Data["FileTreePath"] = path.Join(subfolder, readmeFile.Name())
|
||||
ctx.Data["FileSize"] = fInfo.fileSize
|
||||
ctx.Data["IsLFSFile"] = fInfo.isLFSFile
|
||||
|
||||
|
Reference in New Issue
Block a user