Skip to content

Commit 6d4be0c

Browse files
committed
use unix-like slash for paths (also on Win)
1 parent 64afca7 commit 6d4be0c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

download.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ func spDownloadTool(name string, url string) {
111111
}
112112

113113
// will be something like ${tempfolder}/avrdude/bin/avrdude
114-
globalToolsMap["{runtime.tools."+name+".path}"] = tempToolsPath + "/" + name
114+
globalToolsMap["{runtime.tools."+name+".path}"] = filepath.ToSlash(tempToolsPath + "/" + name)
115115

116116
log.Info("Map Updated")
117117
mapD := map[string]string{"DownloadStatus": "Success", "Msg": "Map Updated"}

programmer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ func spProgramLocal(portname string, boardname string, filePath string, commandl
138138
return
139139
}
140140

141-
commandline = strings.Replace(commandline, "{build.path}", filepath.Dir(filePath), 1)
141+
commandline = strings.Replace(commandline, "{build.path}", filepath.ToSlash(filepath.Dir(filePath)), 1)
142142
commandline = strings.Replace(commandline, "{build.project_name}", strings.TrimSuffix(filepath.Base(filePath), filepath.Ext(filepath.Base(filePath))), 1)
143143
commandline = strings.Replace(commandline, "{serial.port}", portname, 1)
144144
commandline = strings.Replace(commandline, "{serial.port.file}", filepath.Base(portname), 1)

0 commit comments

Comments
 (0)