Skip to content

Commit 1d2a4b7

Browse files
committed
[WIN] solve some path-replated bugs
1 parent 1acfc46 commit 1d2a4b7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tools/tools.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"os"
77
"os/user"
88
"path"
9+
"path/filepath"
910
"strings"
1011

1112
log "github.com/Sirupsen/logrus"
@@ -62,7 +63,7 @@ func (t *Tools) GetLocation(command string) (string, error) {
6263
}
6364
}
6465

65-
return location, nil
66+
return filepath.ToSlash(location), nil
6667
}
6768

6869
func (t *Tools) writeMap() error {
@@ -85,7 +86,7 @@ func (t *Tools) readMap() error {
8586

8687
func dir() string {
8788
usr, _ := user.Current()
88-
return usr.HomeDir + "/.arduino-create"
89+
return path.Join(usr.HomeDir, ".arduino-create")
8990
}
9091

9192
// createDir creates the directory where the tools will be stored

0 commit comments

Comments
 (0)