From 380337b76b24751af4b512646939760717a8322c Mon Sep 17 00:00:00 2001
From: Matt Bell <mappum@gmail.com>
Date: Mon, 17 Nov 2014 02:38:20 -0800
Subject: [PATCH] commands/cli: Use filepath.Join for file path building

---
 commands/cli/parse.go | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/commands/cli/parse.go b/commands/cli/parse.go
index 5199c4dd9..02a5a9da4 100644
--- a/commands/cli/parse.go
+++ b/commands/cli/parse.go
@@ -5,6 +5,7 @@ import (
 	"errors"
 	"fmt"
 	"os"
+	fp "path/filepath"
 	"strings"
 
 	cmds "github.com/jbenet/go-ipfs/commands"
@@ -281,7 +282,7 @@ func getFile(file *os.File, path string) (cmds.File, error) {
 	files := make([]cmds.File, 0, len(contents))
 
 	for _, child := range contents {
-		childPath := fmt.Sprintf("%s/%s", path, child.Name())
+		childPath := fp.Join(path, child.Name())
 		childFile, err := os.Open(childPath)
 		if err != nil {
 			return nil, err
-- 
GitLab