]> Cypherpunks repositories - gostls13.git/commit
os: make RemoveAll("") fail silently on unix
authorTobias Klauser <tklauser@distanz.ch>
Sat, 17 Nov 2018 13:09:24 +0000 (14:09 +0100)
committerTobias Klauser <tobias.klauser@gmail.com>
Sun, 18 Nov 2018 16:13:13 +0000 (16:13 +0000)
commit760ac1dd33f460a1e73c912913eb0c3da7afb286
treec8c05326171cb90c521e975f1cb71034933d4f23
parent5001a38cc1a25850314a77bcde5df32371493236
os: make RemoveAll("") fail silently on unix

CL 146020 changed the behavior of RemoveAll("") on unix systems using
the *at functions to return syscall.EINVAL instead of nil. Adjust the
*at implementation to retain this behavior as is the case on the *noat
systems.

Additionally, also make sure RemoveAll("") on systems not using the "at
functions (e.g. nacl and js/wasm) follow the same behavior (which wasn't
the case previously).

Fixes #28830

Change-Id: I8383c1423fefe871d18ff49134a1d23077ec6867
Reviewed-on: https://go-review.googlesource.com/c/150158
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: roger peppe <rogpeppe@gmail.com>
src/os/removeall_at.go
src/os/removeall_noat.go
src/os/removeall_test.go