summaryrefslogtreecommitdiff
path: root/src/os
diff options
context:
space:
mode:
authorBrad Fitzpatrick <bradfitz@golang.org>2014-09-23 14:55:19 -0700
committerBrad Fitzpatrick <bradfitz@golang.org>2014-09-23 14:55:19 -0700
commitf5bdbc64083690841d98dc86eab44245be9c345b (patch)
tree8d544297ac476a5cbadfb8d49b0108d3e0ee3e68 /src/os
parenta799331ee58770a1ad3d82eb70bb52e54de94b57 (diff)
downloadgo-f5bdbc64083690841d98dc86eab44245be9c345b.tar.gz
os: add a comment inside RemoveAll
LGTM=r R=r CC=golang-codereviews https://codereview.appspot.com/149950043
Diffstat (limited to 'src/os')
-rw-r--r--src/os/path.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/os/path.go b/src/os/path.go
index b1a90b3e5..24a3415b4 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