mirror of
https://github.com/go-gitea/gitea.git
synced 2024-11-04 08:17:24 -05:00
fix #195
This commit is contained in:
parent
a0a95d797e
commit
04890904f9
@ -47,7 +47,7 @@ func ZipDownload(ctx *middleware.Context, params martini.Params) {
|
|||||||
commitId := ctx.Repo.CommitId
|
commitId := ctx.Repo.CommitId
|
||||||
archivesPath := filepath.Join(ctx.Repo.GitRepo.Path, "archives/zip")
|
archivesPath := filepath.Join(ctx.Repo.GitRepo.Path, "archives/zip")
|
||||||
if !com.IsDir(archivesPath) {
|
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)
|
ctx.Handle(404, "ZipDownload -> os.Mkdir(archivesPath)", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -73,7 +73,7 @@ func TarGzDownload(ctx *middleware.Context, params martini.Params) {
|
|||||||
commitId := ctx.Repo.CommitId
|
commitId := ctx.Repo.CommitId
|
||||||
archivesPath := filepath.Join(ctx.Repo.GitRepo.Path, "archives/targz")
|
archivesPath := filepath.Join(ctx.Repo.GitRepo.Path, "archives/targz")
|
||||||
if !com.IsDir(archivesPath) {
|
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)
|
ctx.Handle(404, "TarGzDownload -> os.Mkdir(archivesPath)", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user