diff options
author | bytedream <bytedream@protonmail.com> | 2025-05-05 23:15:22 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-05-06 00:15:22 +0300 |
commit | 12bf0b8e4270956cee1739520d303d9b7527a7f0 (patch) | |
tree | 330f7fde04af28f16722517a0458e3a6e4e42e5d /routers/web | |
parent | 712fccadd6dcff98bd9ca7515288d5c7645bf802 (diff) | |
download | gitea-main.tar.gz gitea-main.zip |
Regression from #34356, files like SVGs should be editable too
(https://github.com/go-gitea/gitea/pull/34356#discussion_r2072766240).
Diffstat (limited to 'routers/web')
-rw-r--r-- | routers/web/repo/editor.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/web/repo/editor.go b/routers/web/repo/editor.go index 514eb0ebfe..03e5b830a0 100644 --- a/routers/web/repo/editor.go +++ b/routers/web/repo/editor.go @@ -165,7 +165,7 @@ func editFile(ctx *context.Context, isNewFile bool) { ctx.Data["FileSize"] = blob.Size() // Only some file types are editable online as text. - if !fInfo.isTextFile || fInfo.isLFSFile { + if !fInfo.st.IsRepresentableAsText() || fInfo.isLFSFile { ctx.NotFound(nil) return } |