Use filepath package to be more windows friendly

This commit is contained in:
Cole Brown 2018-11-29 14:02:28 -05:00
parent dd60de832f
commit 3430c5766d
1 changed files with 3 additions and 2 deletions

View File

@ -7,6 +7,7 @@ import (
"fmt" "fmt"
"io/ioutil" "io/ioutil"
"os" "os"
"path/filepath"
"testing" "testing"
cid "github.com/ipfs/go-cid" cid "github.com/ipfs/go-cid"
@ -26,8 +27,8 @@ func createTempDir(t *testing.T) (string, string, func()) {
if err != nil { if err != nil {
t.Fatalf("creating temp dir: %s", err) t.Fatalf("creating temp dir: %s", err)
} }
daemonPath := dir + "/daemon.sock" daemonPath := filepath.Join(dir, "daemon.sock")
clientPath := dir + "/client.sock" clientPath := filepath.Join(dir, "client.sock")
closer := func() { closer := func() {
os.RemoveAll(dir) os.RemoveAll(dir)
} }