From: Brad Fitzpatrick Date: Tue, 23 Sep 2014 21:55:19 +0000 (-0700) Subject: os: add a comment inside RemoveAll X-Git-Tag: go1.4beta1~320 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=db492b8df41cd90ebecaf69a73bf4cc5e0db5f20;p=gostls13.git os: add a comment inside RemoveAll LGTM=r R=r CC=golang-codereviews https://golang.org/cl/149950043 --- diff --git a/src/os/path.go b/src/os/path.go index b1a90b3e52..24a3415b46 100644 --- a/src/os/path.go +++ b/src/os/path.go @@ -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