Commit 1caf55eb authored by Alex Brainman's avatar Alex Brainman

windows: use FILE_FLAG_BACKUP_SEMANTICS in Utimes/UtimesNano

This is a copy of https://golang.org/cl/154020043 in the syscall package.

Fixes golang/go#10804

Change-Id: I6f6177e30c105c8065fdc8cc351e899090e160a9
Reviewed-on: https://go-review.googlesource.com/10076Reviewed-by: 's avatarMinux Ma <minux@golang.org>
parent 4cd067a7
......@@ -430,7 +430,7 @@ func Utimes(path string, tv []Timeval) (err error) {
}
h, e := CreateFile(pathp,
FILE_WRITE_ATTRIBUTES, FILE_SHARE_WRITE, nil,
OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0)
OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0)
if e != nil {
return e
}
......@@ -450,7 +450,7 @@ func UtimesNano(path string, ts []Timespec) (err error) {
}
h, e := CreateFile(pathp,
FILE_WRITE_ATTRIBUTES, FILE_SHARE_WRITE, nil,
OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0)
OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0)
if e != nil {
return e
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment