From: Brad Fitzpatrick Date: Tue, 23 Sep 2014 21:26:20 +0000 (-0700) Subject: os: fix another case where RemoveAll should return nil X-Git-Tag: go1.4beta1~321 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=82ddcc05f44a510118a1fc8bb8e3552a92d8f441;p=gostls13.git 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 --- diff --git a/src/os/path.go b/src/os/path.go index 6cc69403b6..b1a90b3e52 100644 --- a/src/os/path.go +++ b/src/os/path.go @@ -86,6 +86,9 @@ func RemoveAll(path string) error { // Directory. fd, err := Open(path) if err != nil { + if IsNotExist(err) { + return nil + } return err }