소스 검색

Update repo.go

Release download file name doesn't include tag number #2339
Download: Changed to use refName instead of commit.ID for downloaded file name
ddelpero 9 년 전
부모
커밋
7655337a1f
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      routers/repo/repo.go

+ 1 - 1
routers/repo/repo.go

@@ -330,5 +330,5 @@ func Download(ctx *middleware.Context) {
 		}
 	}
 
-	ctx.ServeFile(archivePath, ctx.Repo.Repository.Name+"-"+base.ShortSha(commit.ID.String())+ext)
+	ctx.ServeFile(archivePath, ctx.Repo.Repository.Name+"-"+refName+ext)
 }