|
@@ -13,7 +13,7 @@ import (
|
|
"github.com/Unknwon/com"
|
|
"github.com/Unknwon/com"
|
|
log "gopkg.in/clog.v1"
|
|
log "gopkg.in/clog.v1"
|
|
|
|
|
|
- "github.com/gogits/git-module"
|
|
|
|
|
|
+ "github.com/G-Node/git-module"
|
|
|
|
|
|
"github.com/G-Node/gogs/models"
|
|
"github.com/G-Node/gogs/models"
|
|
"github.com/G-Node/gogs/models/errors"
|
|
"github.com/G-Node/gogs/models/errors"
|
|
@@ -273,6 +273,10 @@ func Download(c *context.Context) {
|
|
)
|
|
)
|
|
|
|
|
|
switch {
|
|
switch {
|
|
|
|
+ case strings.HasSuffix(uri, ".gin.zip"):
|
|
|
|
+ ext = ".gin.zip"
|
|
|
|
+ archivePath = path.Join(c.Repo.GitRepo.Path, "archives/gin")
|
|
|
|
+ archiveType = git.GIN
|
|
case strings.HasSuffix(uri, ".zip"):
|
|
case strings.HasSuffix(uri, ".zip"):
|
|
ext = ".zip"
|
|
ext = ".zip"
|
|
archivePath = path.Join(c.Repo.GitRepo.Path, "archives/zip")
|
|
archivePath = path.Join(c.Repo.GitRepo.Path, "archives/zip")
|
|
@@ -281,6 +285,7 @@ func Download(c *context.Context) {
|
|
ext = ".tar.gz"
|
|
ext = ".tar.gz"
|
|
archivePath = path.Join(c.Repo.GitRepo.Path, "archives/targz")
|
|
archivePath = path.Join(c.Repo.GitRepo.Path, "archives/targz")
|
|
archiveType = git.TARGZ
|
|
archiveType = git.TARGZ
|
|
|
|
+
|
|
default:
|
|
default:
|
|
log.Trace("Unknown format: %s", uri)
|
|
log.Trace("Unknown format: %s", uri)
|
|
c.Error(404)
|
|
c.Error(404)
|