summaryrefslogtreecommitdiffstats
path: root/routers/repo/download.go
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-05-16 16:24:26 -0400
committerUnknown <joe2010xtmf@163.com>2014-05-16 16:24:26 -0400
commit04890904f9896f181a6a847d036da20611448a16 (patch)
tree6354e71c96729aed720017fd988776498b296914 /routers/repo/download.go
parenta0a95d797eddc07c3c2f53faa57c06c9c30f29eb (diff)
downloadgitea-04890904f9896f181a6a847d036da20611448a16.tar.gz
gitea-04890904f9896f181a6a847d036da20611448a16.zip
fix #195
Diffstat (limited to 'routers/repo/download.go')
-rw-r--r--routers/repo/download.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/repo/download.go b/routers/repo/download.go
index d94e47665d..e5ec1c79f1 100644
--- a/routers/repo/download.go
+++ b/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
}