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

Commit

Permalink
Uses filepath.join instead of path.join
Browse files Browse the repository at this point in the history
- This makes the path to the plugin have the correct slash on Windows
  • Loading branch information
Cooklin authored and Joel R Cooklin committed Feb 14, 2017
1 parent 1b5b6b7 commit b08312d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions control/plugin_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import (
"errors"
"fmt"
"os"
"path"
"path/filepath"
"runtime"
"strconv"
Expand Down Expand Up @@ -324,7 +323,7 @@ func (p *pluginManager) LoadPlugin(details *pluginDetails, emitter gomit.Emitter
// run from.
commands := make([]string, len(lPlugin.Details.Exec))
for i, e := range lPlugin.Details.Exec {
commands[i] = path.Join(lPlugin.Details.ExecPath, e)
commands[i] = filepath.Join(lPlugin.Details.ExecPath, e)
}
ePlugin, err := plugin.NewExecutablePlugin(
p.GenerateArgs(int(log.GetLevel())),
Expand Down
4 changes: 2 additions & 2 deletions mgmt/rest/common/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package common
import (
"io/ioutil"
"os"
"path"
"path/filepath"
"runtime"

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

f, err := os.Create(path.Join(dir, filename))
f, err := os.Create(filepath.Join(dir, filename))
if err != nil {
return "", err
}
Expand Down

0 comments on commit b08312d

Please sign in to comment.