mirror of https://github.com/golang/go.git
os: add a comment inside RemoveAll
LGTM=r R=r CC=golang-codereviews https://golang.org/cl/149950043
This commit is contained in:
parent
82ddcc05f4
commit
db492b8df4
|
|
@ -87,6 +87,8 @@ func RemoveAll(path string) error {
|
|||
fd, err := Open(path)
|
||||
if err != nil {
|
||||
if IsNotExist(err) {
|
||||
// Race. It was deleted between the Lstat and Open.
|
||||
// Return nil per RemoveAll's docs.
|
||||
return nil
|
||||
}
|
||||
return err
|
||||
|
|
|
|||
Loading…
Reference in New Issue