瀏覽代碼

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)
 }