mirror of
https://github.com/golang/go
synced 2024-10-14 11:53:56 +00: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 a new issue