Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commit b08312d

Browse files
CooklinJoel R Cooklin
authored andcommitted
Uses filepath.join instead of path.join
- This makes the path to the plugin have the correct slash on Windows
1 parent 1b5b6b7 commit b08312d

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

control/plugin_manager.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ import (
2626
"errors"
2727
"fmt"
2828
"os"
29-
"path"
3029
"path/filepath"
3130
"runtime"
3231
"strconv"
@@ -324,7 +323,7 @@ func (p *pluginManager) LoadPlugin(details *pluginDetails, emitter gomit.Emitter
324323
// run from.
325324
commands := make([]string, len(lPlugin.Details.Exec))
326325
for i, e := range lPlugin.Details.Exec {
327-
commands[i] = path.Join(lPlugin.Details.ExecPath, e)
326+
commands[i] = filepath.Join(lPlugin.Details.ExecPath, e)
328327
}
329328
ePlugin, err := plugin.NewExecutablePlugin(
330329
p.GenerateArgs(int(log.GetLevel())),

mgmt/rest/common/common.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package common
33
import (
44
"io/ioutil"
55
"os"
6-
"path"
6+
"path/filepath"
77
"runtime"
88

99
log "github.com/Sirupsen/logrus"
@@ -17,7 +17,7 @@ func WriteFile(filename string, b []byte) (string, error) {
1717
return "", err
1818
}
1919

20-
f, err := os.Create(path.Join(dir, filename))
20+
f, err := os.Create(filepath.Join(dir, filename))
2121
if err != nil {
2222
return "", err
2323
}

0 commit comments

Comments
 (0)