Always use filepath.Join instead of path.Join

This patch cleans up pkg/util/mount/* and pkg/util/volume/* to always
use filepath.Join instead of path.Join. filepath.Join is preferred
because path.Join can have issues on Windows.
This commit is contained in:
Travis Rhoden
2019-03-29 17:23:31 -06:00
parent 12b7f1450c
commit 78d109e201
62 changed files with 210 additions and 221 deletions

View File

@@ -19,7 +19,7 @@ package util
import (
"io/ioutil"
"os"
"path"
"path/filepath"
"testing"
"k8s.io/api/core/v1"
@@ -206,7 +206,7 @@ func TestGetNestedMountpoints(t *testing.T) {
}
defer os.RemoveAll(dir)
rootdir := path.Join(dir, "vol")
rootdir := filepath.Join(dir, "vol")
err = os.Mkdir(rootdir, 0755)
if err != nil {
t.Errorf("Unexpected error trying to create temp root directory: %v", err)