aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDavid Crawshaw <david.crawshaw@zentus.com>2014-07-09 14:12:30 -0400
committerDavid Crawshaw <david.crawshaw@zentus.com>2014-07-09 14:12:30 -0400
commitc4b714d3fe36fe5c1928711940a9e7b8c9fb7db3 (patch)
tree9f7dccd16e8f938e2d53aa1fc39900a4d3f70122 /src
parent5512f6f3b333c97207a860cf89d78edf6bb38940 (diff)
downloadgo-c4b714d3fe36fe5c1928711940a9e7b8c9fb7db3.tar.xz
os: no /tmp on android
LGTM=minux, bradfitz R=golang-codereviews, minux, bradfitz CC=golang-codereviews https://golang.org/cl/104650043
Diffstat (limited to 'src')
-rw-r--r--src/pkg/os/file_unix.go6
1 files changed, 5 insertions, 1 deletions
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
}