]> Cypherpunks repositories - gostls13.git/commitdiff
os: broaden the range of errors understood by IsNotExist on Plan 9
authorNicolas Owens <mischief@offblast.org>
Fri, 18 Jul 2014 18:04:29 +0000 (11:04 -0700)
committerRob Pike <r@golang.org>
Fri, 18 Jul 2014 18:04:29 +0000 (11:04 -0700)
Ken's standalone file server and its derivatives, like cwfs, return
error strings different from fossil when the user opens non-existent
files.

LGTM=aram, 0intro, r
R=0intro, aram, r
CC=golang-codereviews, ken
https://golang.org/cl/112420045

src/pkg/os/error_plan9.go

index 85260c82aeab651d07222c5b16390d655e1d869a..62d4e420e442374cac1b83e06f3126adaddf7ddc 100644 (file)
@@ -25,7 +25,7 @@ func isNotExist(err error) bool {
        case *LinkError:
                err = pe.Err
        }
-       return contains(err.Error(), "does not exist")
+       return contains(err.Error(), "does not exist") || contains(err.Error(), "not found")
 }
 
 func isPermission(err error) bool {