Skip to content

Commit 480049f

Browse files
committed
Replaced path package with filepath for correct path concatenation on Windows.
1 parent 7b6cf20 commit 480049f

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

cmd/cptest/filesystem.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@ import (
55
"fmt"
66
"io/ioutil"
77
"os"
8-
"path"
8+
"path/filepath"
99
"strings"
1010

1111
"github.com/kuredoro/cptest"
1212
)
1313

14-
func joinIfRelative(dir, filepath string) string {
15-
if filepath != "" && filepath[0] == '/' {
16-
return filepath
14+
func joinIfRelative(dir, file string) string {
15+
if file != "" && file[0] == '/' {
16+
return file
1717
}
1818

19-
return path.Join(dir, filepath)
19+
return filepath.Join(dir, file)
2020
}
2121

2222
func ReadInputs(inputsPath string) (cptest.Inputs, []error) {
@@ -76,7 +76,7 @@ func FindExecutable(dirPath string) (string, error) {
7676

7777
var execs []string
7878
for _, name := range names {
79-
name = path.Join(wd, name)
79+
name = filepath.Join(wd, name)
8080
if IsExec(name) == nil {
8181
execs = append(execs, name)
8282
}

0 commit comments

Comments
 (0)