Remove skipping of TestRemoveUnreadableDir on Windows.
Fixes #26295
Change-Id: I364a3caa55406c855ece807759f6298f7e4ddf1e
Reviewed-on: https://go-review.googlesource.com/c/go/+/203599
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
import (
"io"
+ "runtime"
"syscall"
)
if err1 == nil || IsNotExist(err1) {
return nil
}
+ if runtime.GOOS == "windows" && IsPermission(err1) {
+ if fs, err := Stat(path); err == nil {
+ if err = Chmod(path, FileMode(0200 | int(fs.Mode()))); err == nil {
+ err1 = Remove(path)
+ }
+ }
+ }
if err == nil {
err = err1
}
func TestRemoveUnreadableDir(t *testing.T) {
switch runtime.GOOS {
- case "js", "windows":
+ case "js":
t.Skipf("skipping test on %s", runtime.GOOS)
}