Merge pull request #3252 from mlgibbons/caching-fix

Fix Windows cache path issues with directory hierarchies and lower-case drive letters
pull/3194/head
Thomas Strömberg 2019-01-16 11:16:16 -08:00 committed by GitHub
commit 9b45920503
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 4 deletions

View File

@ -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
}
@ -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
}