mirror of
https://github.com/go-gitea/gitea.git
synced 2025-05-12 10:30:26 +02:00
Backport #34374 by @bytedream Regression from #34356, files like SVGs should be editable too (https://github.com/go-gitea/gitea/pull/34356#discussion_r2072766240). Co-authored-by: bytedream <bytedream@protonmail.com>
This commit is contained in:
parent
e4717d426e
commit
ed527b664d
@ -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
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user