Commit 9f31353a authored by Brad Fitzpatrick's avatar Brad Fitzpatrick Committed by Ian Lance Taylor

cmd/go: use Windows %AppData% for build cache if %LocalAppData% is empty

Fixes #23190

Change-Id: I96805aaab44ddaae6098b4e3af30f9e52585eae0
Reviewed-on: https://go-review.googlesource.com/87675
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
parent 9745eed4
......@@ -68,6 +68,11 @@ func DefaultDir() string {
switch runtime.GOOS {
case "windows":
dir = os.Getenv("LocalAppData")
if dir == "" {
// Fall back to %AppData%, the old name of
// %LocalAppData% on Windows XP.
dir = os.Getenv("AppData")
}
if dir == "" {
return "off"
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment