summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad Fitzpatrick <bradfitz@golang.org>2014-09-23 14:26:20 -0700
committerBrad Fitzpatrick <bradfitz@golang.org>2014-09-23 14:26:20 -0700
commita799331ee58770a1ad3d82eb70bb52e54de94b57 (patch)
tree1309287167a62c190f37c81724ae0304f9d1adc9
parentc54573c43c437dd46ecc44ea3f9c63209f80237d (diff)
downloadgo-a799331ee58770a1ad3d82eb70bb52e54de94b57.tar.gz
os: fix another case where RemoveAll should return nil
This hopefully fixes issue 8793. Fixes Issue 8793 LGTM=iant R=rsc, iant CC=golang-codereviews https://codereview.appspot.com/150860046
-rw-r--r--src/os/path.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/os/path.go b/src/os/path.go
index 6cc69403b..b1a90b3e5 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
}