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

Show if File is Executable (#25287) (#25300)

Backport #25287 by @JakobDev

This simply shows if a File has the executable Permission


![grafik](https://github.com/go-gitea/gitea/assets/15185051/1d50c105-6d55-4ecc-808a-c9cd5559d238)

Co-authored-by: JakobDev <jakobdev@gmx.de>
Co-authored-by: silverwind <me@silverwind.io>
This commit is contained in:
Giteabot
2023-06-16 05:29:26 -04:00
committed by GitHub
parent 3a29f6aaff
commit e5422db5c7
3 changed files with 7 additions and 0 deletions

View File

@@ -382,6 +382,7 @@ func renderFile(ctx *context.Context, entry *git.TreeEntry, treeLink, rawLink st
ctx.Data["IsRepresentableAsText"] = isRepresentableAsText
ctx.Data["IsDisplayingSource"] = isDisplayingSource
ctx.Data["IsDisplayingRendered"] = isDisplayingRendered
ctx.Data["IsExecutable"] = entry.IsExecutable()
isTextSource := fInfo.isTextFile || isDisplayingSource
ctx.Data["IsTextSource"] = isTextSource