summaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-04-15 20:01:20 -0400
committerUnknown <joe2010xtmf@163.com>2014-04-15 20:01:20 -0400
commitc3a52f7dd075f1f3cf7fb935b7489629760837ab (patch)
treeab27cc4a5cc1d10c366bcfd04585f02fccb8176b /routers
parent67426534ef9f0ceba49330cbc0b7676f4009a6e1 (diff)
downloadgitea-c3a52f7dd075f1f3cf7fb935b7489629760837ab.tar.gz
gitea-c3a52f7dd075f1f3cf7fb935b7489629760837ab.zip
Mirror bug fix on downloading zip
Diffstat (limited to 'routers')
-rw-r--r--routers/repo/repo.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/repo/repo.go b/routers/repo/repo.go
index 14a3c7622c..6422f0a324 100644
--- a/routers/repo/repo.go
+++ b/routers/repo/repo.go
@@ -153,7 +153,7 @@ func Single(ctx *middleware.Context, params martini.Params) {
} else {
ctx.Data["FileSize"] = blob.Size()
ctx.Data["IsFile"] = true
- ctx.Data["FileName"] = blob.Name
+ ctx.Data["FileName"] = blob.Name()
ext := path.Ext(blob.Name())
if len(ext) > 0 {
ext = ext[1:]
@@ -226,7 +226,7 @@ func Single(ctx *middleware.Context, params martini.Params) {
ctx.Data["FileLink"] = rawLink + "/" + treename
_, isTextFile := base.IsTextFile(data)
ctx.Data["FileIsText"] = isTextFile
- ctx.Data["FileName"] = readmeFile.Name
+ ctx.Data["FileName"] = readmeFile.Name()
if isTextFile {
ctx.Data["FileContent"] = string(base.RenderMarkdown(data, branchLink))
}