mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-06 10:17:37 +02:00
Notify the user when the file path contains leading or trailing spaces and fix the error message for invalid file names. (#31507)
close #31478
This commit is contained in:
1 parent
6fa962f409
commit
3269b04d61
2 files changed
+45
-6
No files matched your search
@@ -317,7 +317,7 @@ func editFilePost(ctx *context.Context, form forms.EditRepoFileForm, isNewFile b
|
||||
case git.EntryModeBlob:
|
||||
ctx.RenderWithErr(ctx.Tr("repo.editor.directory_is_a_file", fileErr.Path), tplEditFile, &form)
|
||||
default:
|
||||
ctx.Error(http.StatusInternalServerError, err.Error())
|
||||
ctx.RenderWithErr(ctx.Tr("repo.editor.filename_is_invalid", fileErr.Path), tplEditFile, &form)
|
||||
}
|
||||
} else {
|
||||
ctx.Error(http.StatusInternalServerError, err.Error())
|
||||
|
||||
Reference in new issue
Block a user