os: fix another case where RemoveAll should return nil

This hopefully fixes issue 8793.

Fixes #8793

LGTM=iant
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/150860046
This commit is contained in:
Brad Fitzpatrick 2014-09-23 14:26:20 -07:00
parent c486d4130d
commit 82ddcc05f4
1 changed files with 3 additions and 0 deletions

View File

@ -86,6 +86,9 @@ func RemoveAll(path string) error {
// Directory.
fd, err := Open(path)
if err != nil {
if IsNotExist(err) {
return nil
}
return err
}