Commit 82ddcc05 authored by Brad Fitzpatrick's avatar Brad Fitzpatrick

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
parent c486d413
...@@ -86,6 +86,9 @@ func RemoveAll(path string) error { ...@@ -86,6 +86,9 @@ func RemoveAll(path string) error {
// Directory. // Directory.
fd, err := Open(path) fd, err := Open(path)
if err != nil { if err != nil {
if IsNotExist(err) {
return nil
}
return err return err
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment