Unknown 11 年之前
父節點
當前提交
04890904f9
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      routers/repo/download.go

+ 2 - 2
routers/repo/download.go

@@ -47,7 +47,7 @@ func ZipDownload(ctx *middleware.Context, params martini.Params) {
 	commitId := ctx.Repo.CommitId
 	archivesPath := filepath.Join(ctx.Repo.GitRepo.Path, "archives/zip")
 	if !com.IsDir(archivesPath) {
-		if err := os.Mkdir(archivesPath, 0755); err != nil {
+		if err := os.MkdirAll(archivesPath, 0755); err != nil {
 			ctx.Handle(404, "ZipDownload -> os.Mkdir(archivesPath)", err)
 			return
 		}
@@ -73,7 +73,7 @@ func TarGzDownload(ctx *middleware.Context, params martini.Params) {
 	commitId := ctx.Repo.CommitId
 	archivesPath := filepath.Join(ctx.Repo.GitRepo.Path, "archives/targz")
 	if !com.IsDir(archivesPath) {
-		if err := os.Mkdir(archivesPath, 0755); err != nil {
+		if err := os.MkdirAll(archivesPath, 0755); err != nil {
 			ctx.Handle(404, "TarGzDownload -> os.Mkdir(archivesPath)", err)
 			return
 		}