mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
os: clarify behavior of TempDir
Fixes #19695 Change-Id: Ie5103f7905969e25dba6e5fb37344b70e807fc69 Reviewed-on: https://go-review.googlesource.com/45702 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
071908f3d8
commit
0b81c023a7
4 changed files with 16 additions and 6 deletions
|
|
@ -294,8 +294,7 @@ func Remove(name string) error {
|
|||
return &PathError{"remove", name, e}
|
||||
}
|
||||
|
||||
// TempDir returns the default directory to use for temporary files.
|
||||
func TempDir() string {
|
||||
func tempDir() string {
|
||||
dir := Getenv("TMPDIR")
|
||||
if dir == "" {
|
||||
if runtime.GOOS == "android" {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue