summaryrefslogtreecommitdiff
path: root/libgo/go/io/ioutil/tempfile.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/io/ioutil/tempfile.go')
-rw-r--r--libgo/go/io/ioutil/tempfile.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/libgo/go/io/ioutil/tempfile.go b/libgo/go/io/ioutil/tempfile.go
index 8e681bdc3bc..658ea78bb7c 100644
--- a/libgo/go/io/ioutil/tempfile.go
+++ b/libgo/go/io/ioutil/tempfile.go
@@ -40,7 +40,7 @@ func nextSuffix() string {
// will not choose the same file. The caller can use f.Name()
// to find the name of the file. It is the caller's responsibility to
// remove the file when no longer needed.
-func TempFile(dir, prefix string) (f *os.File, err os.Error) {
+func TempFile(dir, prefix string) (f *os.File, err error) {
if dir == "" {
dir = os.TempDir()
}
@@ -49,7 +49,7 @@ func TempFile(dir, prefix string) (f *os.File, err os.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.Error == os.EEXIST {
+ if pe, ok := err.(*os.PathError); ok && pe.Err == os.EEXIST {
if nconflict++; nconflict > 10 {
rand = reseed()
}
@@ -67,7 +67,7 @@ func TempFile(dir, prefix string) (f *os.File, err os.Error) {
// Multiple programs calling TempDir simultaneously
// will not choose the same directory. It is the caller's responsibility
// to remove the directory when no longer needed.
-func TempDir(dir, prefix string) (name string, err os.Error) {
+func TempDir(dir, prefix string) (name string, err error) {
if dir == "" {
dir = os.TempDir()
}
@@ -76,7 +76,7 @@ func TempDir(dir, prefix string) (name string, err os.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.Error == os.EEXIST {
+ if pe, ok := err.(*os.PathError); ok && pe.Err == os.EEXIST {
if nconflict++; nconflict > 10 {
rand = reseed()
}