aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tunnel/winipcfg/netsh.go
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-05-25 02:23:34 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2019-05-25 02:23:34 +0200
commitb33299a29713f2d87fba572010f87f1361480cba (patch)
tree432899e15da424b1a2c28041190db3144c94480c /tunnel/winipcfg/netsh.go
parentbuild: opt in to walk cgo (diff)
downloadwireguard-windows-b33299a29713f2d87fba572010f87f1361480cba.tar.xz
wireguard-windows-b33299a29713f2d87fba572010f87f1361480cba.zip
global: use filepath.Join uniformly
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to '')
-rw-r--r--tunnel/winipcfg/netsh.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/tunnel/winipcfg/netsh.go b/tunnel/winipcfg/netsh.go
index 4cff5de8..4714c520 100644
--- a/tunnel/winipcfg/netsh.go
+++ b/tunnel/winipcfg/netsh.go
@@ -10,6 +10,7 @@ import (
"fmt"
"io"
"os/exec"
+ "path/filepath"
"strings"
"golang.org/x/sys/windows"
@@ -23,7 +24,7 @@ func runNetsh(cmds []string) error {
if err != nil {
return err
}
- cmd := exec.Command(system32 + "\\netsh.exe") // I wish we could append (, "-f", "CONIN$") but Go sets up the process context wrong.
+ cmd := exec.Command(filepath.Join(system32, "netsh.exe")) // I wish we could append (, "-f", "CONIN$") but Go sets up the process context wrong.
stdin, err := cmd.StdinPipe()
if err != nil {
return fmt.Errorf("runNetsh stdin pipe - %v", err)