Skip to content

Commit

Permalink
this attempts to resolve
Browse files Browse the repository at this point in the history
#2768
for Windows, by converting \ in directory string to / and using
`path.Join` instead of `filepath.Join` which uses Unix format
instead of using he current OS directory delimeter.
  • Loading branch information
Nicholas Irving committed Oct 16, 2018
1 parent c01c554 commit c05b969
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/minikube/assets/addons.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"fmt"
"os"
"path/filepath"
"path"
"strconv"

"github.com/pkg/errors"
Expand Down Expand Up @@ -305,7 +306,8 @@ func addMinikubeDirToAssets(basedir, vmpath string, assets *[]CopyableFile) erro
return errors.Wrap(err, "generating relative path")
}
rPath = filepath.Dir(rPath)
vmpath = filepath.Join("/", rPath)
rPath = filepath.ToSlash(rPath)
vmpath = path.Join("/", rPath)
}
permString := fmt.Sprintf("%o", info.Mode().Perm())
// The conversion will strip the leading 0 if present, so add it back
Expand Down

0 comments on commit c05b969

Please sign in to comment.