未验证 提交 91be19c4 编写于 作者: T Thomas Strömberg 提交者: GitHub

Merge pull request #3258 from darkedges/master

When copying assets from .minikube/files on windows, directories get squashed during transfer. ie /etc/ssl/certs/test.pem becomes ~minikube/etcsslcerts/test.pem. This pull request ensures any window style directories are converted into unix style.
......@@ -19,6 +19,7 @@ package assets
import (
"fmt"
"os"
"path"
"path/filepath"
"strconv"
......@@ -307,7 +308,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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册