1
0
mirror of https://github.com/golang/go synced 2024-10-02 04:18:33 -06: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:
David Crawshaw 2014-07-09 14:12:30 -04:00
parent 5512f6f3b3
commit c4b714d3fe

View File

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