mirror of
https://github.com/golang/sys.git
synced 2026-02-08 11:46:04 +03:00
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/10076 Reviewed-by: Minux Ma <minux@golang.org>
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user