diff options
Diffstat (limited to 'libgo/go/io/ioutil/tempfile.go')
-rw-r--r-- | libgo/go/io/ioutil/tempfile.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libgo/go/io/ioutil/tempfile.go b/libgo/go/io/ioutil/tempfile.go index 42718cc73d3..e5e315cfb7d 100644 --- a/libgo/go/io/ioutil/tempfile.go +++ b/libgo/go/io/ioutil/tempfile.go @@ -90,6 +90,11 @@ func TempDir(dir, prefix string) (name string, err error) { } continue } + if os.IsNotExist(err) { + if _, err := os.Stat(dir); os.IsNotExist(err) { + return "", err + } + } if err == nil { name = try } |