mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Fix blank dir message when uploading files from web editor (#25391)
Fix #7883
This commit is contained in:
		@@ -685,7 +685,11 @@ func UploadFilePost(ctx *context.Context) {
 | 
			
		||||
 | 
			
		||||
	message := strings.TrimSpace(form.CommitSummary)
 | 
			
		||||
	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)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user