]> source.dussan.org Git - gitea.git/commitdiff
fix #195
authorUnknown <joe2010xtmf@163.com>
Fri, 16 May 2014 20:24:26 +0000 (16:24 -0400)
committerUnknown <joe2010xtmf@163.com>
Fri, 16 May 2014 20:24:26 +0000 (16:24 -0400)
routers/repo/download.go

index d94e47665da75bca9b580a372f5e76fd0126f243..e5ec1c79f14e78738a69309ff6eb131613ef0b5e 100644 (file)
@@ -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
                }