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:
parent
5512f6f3b3
commit
c4b714d3fe
@ -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
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user