Skip to content

Commit

Permalink
Merge pull request kubernetes#99008 from yujuhong/automated-cherry-pi…
Browse files Browse the repository at this point in the history
…ck-of-#98830-upstream-release-1.20

Automated cherry pick of kubernetes#98830 upstream release 1.20
  • Loading branch information
k8s-ci-robot committed Mar 11, 2021
2 parents 4e4aea6 + f3c73ba commit 1bc8205
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/volume/util/subpath/subpath_windows.go
Expand Up @@ -75,7 +75,7 @@ func getUpperPath(path string) string {
// Check whether a directory/file is a link type or not
// LinkType could be SymbolicLink, Junction, or HardLink
func isLinkPath(path string) (bool, error) {
cmd := fmt.Sprintf("(Get-Item -Path %s).LinkType", path)
cmd := fmt.Sprintf("(Get-Item -LiteralPath %q).LinkType", path)
output, err := exec.Command("powershell", "/c", cmd).CombinedOutput()
if err != nil {
return false, err
Expand Down Expand Up @@ -113,7 +113,7 @@ func evalSymlink(path string) (string, error) {
}
}
// This command will give the target path of a given symlink
cmd := fmt.Sprintf("(Get-Item -Path %s).Target", upperpath)
cmd := fmt.Sprintf("(Get-Item -LiteralPath %q).Target", upperpath)
output, err := exec.Command("powershell", "/c", cmd).CombinedOutput()
if err != nil {
return "", err
Expand Down

0 comments on commit 1bc8205

Please sign in to comment.