mirror of
https://github.com/go-gitea/gitea.git
synced 2024-12-03 07:33:49 +08:00
Backport #25391 by @lunny Fix #7883 Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
parent
28ed763f55
commit
4908cc9adf
|
@ -685,7 +685,11 @@ func UploadFilePost(ctx *context.Context) {
|
||||||
|
|
||||||
message := strings.TrimSpace(form.CommitSummary)
|
message := strings.TrimSpace(form.CommitSummary)
|
||||||
if len(message) == 0 {
|
if len(message) == 0 {
|
||||||
message = ctx.Tr("repo.editor.upload_files_to_dir", form.TreePath)
|
dir := form.TreePath
|
||||||
|
if dir == "" {
|
||||||
|
dir = "/"
|
||||||
|
}
|
||||||
|
message = ctx.Tr("repo.editor.upload_files_to_dir", dir)
|
||||||
}
|
}
|
||||||
|
|
||||||
form.CommitMessage = strings.TrimSpace(form.CommitMessage)
|
form.CommitMessage = strings.TrimSpace(form.CommitMessage)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user