diff options
| author | Russ Cox <rsc@golang.org> | 2009-04-13 19:14:09 -0700 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2009-04-13 19:14:09 -0700 |
| commit | 9b3f43774a4f39ebb4d97bc4e76fc67a4388ae33 (patch) | |
| tree | c5afe79ff2bda2cb15e5b83612048de70bba745c /src/lib/os | |
| parent | 5eae3b21025169bfa39fc42d0dfcc997acab8e9d (diff) | |
| download | go-9b3f43774a4f39ebb4d97bc4e76fc67a4388ae33.tar.xz | |
fix error return in Remove
change canexec to canExec.
R=r
DELTA=7 (0 added, 0 deleted, 7 changed)
OCL=27393
CL=27398
Diffstat (limited to 'src/lib/os')
| -rw-r--r-- | src/lib/os/file.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/os/file.go b/src/lib/os/file.go index 80f43bb593..9e98be697a 100644 --- a/src/lib/os/file.go +++ b/src/lib/os/file.go @@ -287,13 +287,13 @@ func Remove(name string) *os.Error { // returns EISDIR, so can't use that. However, // both agree that rmdir(file) returns ENOTDIR, // so we can use that to decide which error is real. - // Rmdir might return ENOTDIR if given a bad + // Rmdir might also return ENOTDIR if given a bad // file path, like /etc/passwd/foo, but in that case, // both errors will be ENOTDIR, so it's okay to // use the error from unlink. if e1 != syscall.ENOTDIR { e = e1; } - return ErrnoToError(e1); + return ErrnoToError(e); } |
