mirror of
https://github.com/go-gitea/gitea.git
synced 2026-05-15 10:43:21 +02:00
Update
This commit is contained in:
parent
4e8a8e4c05
commit
b8d5d358ee
@ -177,11 +177,9 @@ func editFile(ctx *context.Context, isNewFile bool) {
|
|||||||
|
|
||||||
if fInfo.isLFSFile {
|
if fInfo.isLFSFile {
|
||||||
ctx.Data["NotEditableReason"] = ctx.Tr("repo.editor.cannot_edit_lfs_files")
|
ctx.Data["NotEditableReason"] = ctx.Tr("repo.editor.cannot_edit_lfs_files")
|
||||||
} else if !fInfo.isTextFile {
|
} else if !fInfo.st.IsRepresentableAsText() {
|
||||||
ctx.Data["NotEditableReason"] = ctx.Tr("repo.editor.cannot_edit_non_text_files")
|
ctx.Data["NotEditableReason"] = ctx.Tr("repo.editor.cannot_edit_non_text_files")
|
||||||
}
|
} else if blob.Size() >= setting.UI.MaxDisplayFileSize {
|
||||||
|
|
||||||
if blob.Size() >= setting.UI.MaxDisplayFileSize {
|
|
||||||
ctx.Data["NotEditableReason"] = ctx.Tr("repo.editor.cannot_edit_too_large_file")
|
ctx.Data["NotEditableReason"] = ctx.Tr("repo.editor.cannot_edit_too_large_file")
|
||||||
} else {
|
} else {
|
||||||
d, _ := io.ReadAll(dataRc)
|
d, _ := io.ReadAll(dataRc)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user