Commit 4819a1cb authored by Matt Bell's avatar Matt Bell

commands/cli: Use filepath.Join for file path building

parent 75b5d275
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment