From 2cca641ffbcf78db874acbfef8cb86f681ee6ac7 Mon Sep 17 00:00:00 2001 From: Vishal Rana Date: Fri, 16 Oct 2015 07:51:42 -0700 Subject: [PATCH] Fixed #237 Signed-off-by: Vishal Rana --- context.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/context.go b/context.go index 54943e0b..c25e6465 100644 --- a/context.go +++ b/context.go @@ -4,7 +4,7 @@ import ( "encoding/json" "encoding/xml" "net/http" - spath "path" + "path/filepath" "fmt" @@ -198,7 +198,7 @@ func (c *Context) XML(code int, i interface{}) (err error) { // to true, the client is prompted to save the file with provided `name`, // name can be empty, in that case name of the file is used. func (c *Context) File(path, name string, attachment bool) (err error) { - dir, file := spath.Split(path) + dir, file := filepath.Split(path) if attachment { c.response.Header().Set(ContentDisposition, "attachment; filename="+name) }