mirror of
https://gitee.com/gitea/gitea
synced 2025-11-22 17:30:28 +08:00
router/repo: code refactoring
This commit is contained in:
@@ -72,8 +72,7 @@ func editFile(ctx *context.Context, isNewFile bool) {
|
||||
}
|
||||
|
||||
// Only text file are editable online.
|
||||
_, isTextFile := base.IsTextFile(buf)
|
||||
if !isTextFile {
|
||||
if !base.IsTextFile(buf) {
|
||||
ctx.Handle(404, "", nil)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user