From 82ddcc05f44a510118a1fc8bb8e3552a92d8f441 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Tue, 23 Sep 2014 14:26:20 -0700 Subject: [PATCH] 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 --- src/os/path.go | 3 +++ 1 file changed, 3 insertions(+) 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 } -- 2.48.1