update filepath Joins

This commit is contained in:
Henrique Dias 2016-02-22 21:49:09 +00:00
parent e9b13f961b
commit e7369b17b5
1 changed files with 6 additions and 6 deletions

View File

@ -53,10 +53,10 @@ func Install() string {
os.Exit(-1) os.Exit(-1)
} }
caddy := filepath.Clean(usr.HomeDir + "/.caddy/") caddy := filepath.Join(usr.HomeDir, ".caddy")
bin := filepath.Clean(caddy + "/bin") bin := filepath.Join(caddy, "bin")
temp := filepath.Clean(caddy + "/temp") temp := filepath.Join(caddy, "temp")
hugo := filepath.Clean(bin + "/hugo") hugo := filepath.Join(bin, "hugo")
switch runtime.GOOS { switch runtime.GOOS {
case "darwin": case "darwin":
@ -84,7 +84,7 @@ func Install() string {
err = os.Mkdir(bin, 0774) err = os.Mkdir(bin, 0774)
err = os.Mkdir(temp, 0774) err = os.Mkdir(temp, 0774)
tempfile := temp + "/" + filename tempfile := filepath.Join(temp, filename)
fmt.Print("Downloading Hugo from GitHub releases... ") fmt.Print("Downloading Hugo from GitHub releases... ")
@ -151,7 +151,7 @@ func Install() string {
fmt.Println("done.") 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() clean()
ftorename := bin + "/" ftorename := bin + "/"