aboutsummaryrefslogtreecommitdiffstats
path: root/routers/web/repo/editor.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/web/repo/editor.go')
-rw-r--r--routers/web/repo/editor.go2
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
}