mirror of
https://github.com/golang/go
synced 2024-11-19 14:14:40 -07:00
os: no /tmp on android
LGTM=minux, bradfitz R=golang-codereviews, minux, bradfitz CC=golang-codereviews https://golang.org/cl/104650043
This commit is contained in:
parent
5512f6f3b3
commit
c4b714d3fe
@ -308,7 +308,11 @@ func basename(name string) string {
|
||||
func TempDir() string {
|
||||
dir := Getenv("TMPDIR")
|
||||
if dir == "" {
|
||||
dir = "/tmp"
|
||||
if runtime.GOOS == "android" {
|
||||
dir = "/data/local/tmp"
|
||||
} else {
|
||||
dir = "/tmp"
|
||||
}
|
||||
}
|
||||
return dir
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user