From 6fbb984ebf4f0d6804f0f83e6edb12ef0bb9a570 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Wed, 5 Apr 2017 09:05:40 -0400 Subject: Refactoring: rename pkg/base -> pkg/tool --- routers/repo/download.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'routers/repo/download.go') 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") } -- cgit v1.2.3