1
0
mirror of https://github.com/golang/go synced 2024-11-19 15:05:00 -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:
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 { func TempDir() string {
dir := Getenv("TMPDIR") dir := Getenv("TMPDIR")
if dir == "" { if dir == "" {
if runtime.GOOS == "android" {
dir = "/data/local/tmp"
} else {
dir = "/tmp" dir = "/tmp"
} }
}
return dir return dir
} }