Skip to content

Commit

Permalink
Merge pull request #3252 from mlgibbons/caching-fix
Browse files Browse the repository at this point in the history
Fix Windows cache path issues with directory hierarchies and lower-case drive letters
  • Loading branch information
tstromberg authored Jan 16, 2019
2 parents 457d671 + fb68def commit 9b45920
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions pkg/minikube/machine/cache_images.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ func hasWindowsDriveLetter(s string) bool {
}

drive := s[:3]
for _, b := range "CDEFGHIJKLMNOPQRSTUVWXYZAB" {
for _, b := range "CDEFGHIJKLMNOPQRSTUVWXYZABcdefghijklmnopqrstuvwxyzab" {
if d := string(b) + ":"; drive == d+`\` || drive == d+`/` {
return true
}
Expand All @@ -160,9 +160,6 @@ func replaceWinDriveLetterToVolumeName(s string) (string, error) {
return "", err
}
path := vname + s[3:]
if _, err := os.Stat(filepath.Dir(path)); err != nil {
return "", err
}

return path, nil
}
Expand Down

0 comments on commit 9b45920

Please sign in to comment.