mirror of
https://github.com/rwinkhart/sys.git
synced 2026-08-31 14:26:40 -04:00
windows: don't return EINVAL on zero Chmod mode
To match CL 174320 Updates golang/go#20858 Change-Id: Ic4e332c8a84b7d427fc7057aa5b0c2877cc9f7ea Reviewed-on: https://go-review.googlesource.com/c/sys/+/174321 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
@@ -561,9 +561,6 @@ func Fsync(fd Handle) (err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func Chmod(path string, mode uint32) (err error) {
|
func Chmod(path string, mode uint32) (err error) {
|
||||||
if mode == 0 {
|
|
||||||
return syscall.EINVAL
|
|
||||||
}
|
|
||||||
p, e := UTF16PtrFromString(path)
|
p, e := UTF16PtrFromString(path)
|
||||||
if e != nil {
|
if e != nil {
|
||||||
return e
|
return e
|
||||||
|
|||||||
Reference in New Issue
Block a user