From e7369b17b5bef42948bd4602fbe47cb81812519e Mon Sep 17 00:00:00 2001 From: Henrique Dias Date: Mon, 22 Feb 2016 21:49:09 +0000 Subject: [PATCH] update filepath Joins --- insthugo/insthugo.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/insthugo/insthugo.go b/insthugo/insthugo.go index f2f8d24f..f82c0ba7 100644 --- a/insthugo/insthugo.go +++ b/insthugo/insthugo.go @@ -53,10 +53,10 @@ func Install() string { os.Exit(-1) } - caddy := filepath.Clean(usr.HomeDir + "/.caddy/") - bin := filepath.Clean(caddy + "/bin") - temp := filepath.Clean(caddy + "/temp") - hugo := filepath.Clean(bin + "/hugo") + caddy := filepath.Join(usr.HomeDir, ".caddy") + bin := filepath.Join(caddy, "bin") + temp := filepath.Join(caddy, "temp") + hugo := filepath.Join(bin, "hugo") switch runtime.GOOS { case "darwin": @@ -84,7 +84,7 @@ func Install() string { err = os.Mkdir(bin, 0774) err = os.Mkdir(temp, 0774) - tempfile := temp + "/" + filename + tempfile := filepath.Join(temp, filename) fmt.Print("Downloading Hugo from GitHub releases... ") @@ -151,7 +151,7 @@ func Install() string { fmt.Println("done.") - tempfiles = append(tempfiles, bin+"/README.md", bin+"/LICENSE.md") + tempfiles = append(tempfiles, filepath.Join(bin, "README.md"), filepath.Join(bin, "LICENSE.md")) clean() ftorename := bin + "/"