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 e4717d4 commit ed527b6Copy full SHA for ed527b6
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