aboutsummaryrefslogtreecommitdiff
path: root/libgo/go/io
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2012-03-02 20:01:37 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2012-03-02 20:01:37 +0000
commit501699af1603287b1b47ac450fd6eeb826aa76b1 (patch)
tree3eeb8918d39d675108073c8b76d6dd10586a608c /libgo/go/io
parent34c5f21a387dc461042bafc3052ce6e1af786a77 (diff)
downloadgcc-501699af1603287b1b47ac450fd6eeb826aa76b1.zip
gcc-501699af1603287b1b47ac450fd6eeb826aa76b1.tar.gz
gcc-501699af1603287b1b47ac450fd6eeb826aa76b1.tar.bz2
libgo: Update to weekly.2012-02-22 release.
From-SVN: r184819
Diffstat (limited to 'libgo/go/io')
-rw-r--r--libgo/go/io/ioutil/tempfile.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/libgo/go/io/ioutil/tempfile.go b/libgo/go/io/ioutil/tempfile.go
index 645eed6..42d2e67 100644
--- a/libgo/go/io/ioutil/tempfile.go
+++ b/libgo/go/io/ioutil/tempfile.go
@@ -49,7 +49,7 @@ func TempFile(dir, prefix string) (f *os.File, err error) {
for i := 0; i < 10000; i++ {
name := filepath.Join(dir, prefix+nextSuffix())
f, err = os.OpenFile(name, os.O_RDWR|os.O_CREATE|os.O_EXCL, 0600)
- if pe, ok := err.(*os.PathError); ok && pe.Err == os.EEXIST {
+ if os.IsExist(err) {
if nconflict++; nconflict > 10 {
rand = reseed()
}
@@ -76,7 +76,7 @@ func TempDir(dir, prefix string) (name string, err error) {
for i := 0; i < 10000; i++ {
try := filepath.Join(dir, prefix+nextSuffix())
err = os.Mkdir(try, 0700)
- if pe, ok := err.(*os.PathError); ok && pe.Err == os.EEXIST {
+ if os.IsExist(err) {
if nconflict++; nconflict > 10 {
rand = reseed()
}