1
0
mirror of https://github.com/golang/go synced 2024-11-26 04:58:00 -07:00

os: fix IsPermission on windows

Fixes #3482.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5987070
This commit is contained in:
Alex Brainman 2012-04-10 10:07:29 +10:00
parent 6849c4db0c
commit 8e109af83b

View File

@ -26,5 +26,5 @@ func isPermission(err error) bool {
if pe, ok := err.(*PathError); ok {
err = pe.Err
}
return err == ErrPermission
return err == syscall.ERROR_ACCESS_DENIED || err == ErrPermission
}