diff options
author | Unknwon <u@gogs.io> | 2017-04-05 09:05:40 -0400 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2017-04-05 09:05:40 -0400 |
commit | 6fbb984ebf4f0d6804f0f83e6edb12ef0bb9a570 (patch) | |
tree | 81f08210cb3553370795ec11c731d37bb3590122 /routers/repo/download.go | |
parent | ba151eda0a8b6eec2cb45f01fcbc8aef7ad5a06f (diff) |
Refactoring: rename pkg/base -> pkg/tool
Diffstat (limited to 'routers/repo/download.go')
-rw-r--r-- | routers/repo/download.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/routers/repo/download.go b/routers/repo/download.go index 95a0224e..a1ad3eff 100644 --- a/routers/repo/download.go +++ b/routers/repo/download.go @@ -10,7 +10,7 @@ import ( "github.com/gogits/git-module" - "github.com/gogits/gogs/pkg/base" + "github.com/gogits/gogs/pkg/tool" "github.com/gogits/gogs/pkg/context" "github.com/gogits/gogs/pkg/setting" ) @@ -22,8 +22,8 @@ func ServeData(ctx *context.Context, name string, reader io.Reader) error { buf = buf[:n] } - if !base.IsTextFile(buf) { - if !base.IsImageFile(buf) { + if !tool.IsTextFile(buf) { + if !tool.IsImageFile(buf) { ctx.Resp.Header().Set("Content-Disposition", "attachment; filename=\""+name+"\"") ctx.Resp.Header().Set("Content-Transfer-Encoding", "binary") } |