From: David Crawshaw Date: Wed, 9 Jul 2014 18:12:30 +0000 (-0400) Subject: os: no /tmp on android X-Git-Tag: go1.4beta1~1131 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=c4b714d3fe36fe5c1928711940a9e7b8c9fb7db3;p=gostls13.git os: no /tmp on android LGTM=minux, bradfitz R=golang-codereviews, minux, bradfitz CC=golang-codereviews https://golang.org/cl/104650043 --- diff --git a/src/pkg/os/file_unix.go b/src/pkg/os/file_unix.go index 76168339d2..23d5f65360 100644 --- a/src/pkg/os/file_unix.go +++ b/src/pkg/os/file_unix.go @@ -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 }