We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 712fcca commit 12bf0b8Copy full SHA for 12bf0b8
routers/web/repo/editor.go
@@ -165,7 +165,7 @@ func editFile(ctx *context.Context, isNewFile bool) {
165
ctx.Data["FileSize"] = blob.Size()
166
167
// Only some file types are editable online as text.
168
- if !fInfo.isTextFile || fInfo.isLFSFile {
+ if !fInfo.st.IsRepresentableAsText() || fInfo.isLFSFile {
169
ctx.NotFound(nil)
170
return
171
}
0 commit comments