Commit 7a3c6c95 authored by Alex Brainman's avatar Alex Brainman

os: fix SameFile to work for directories on windows

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5756064
parent 3ea3a7c9
......@@ -199,7 +199,7 @@ func (s *winSys) loadFileId() error {
}
s.Lock()
defer s.Unlock()
h, e := syscall.CreateFile(syscall.StringToUTF16Ptr(s.path), syscall.GENERIC_READ, syscall.FILE_SHARE_READ, nil, syscall.OPEN_EXISTING, 0, 0)
h, e := syscall.CreateFile(syscall.StringToUTF16Ptr(s.path), 0, 0, nil, syscall.OPEN_EXISTING, syscall.FILE_FLAG_BACKUP_SEMANTICS, 0)
if e != nil {
return e
}
......
......@@ -666,10 +666,6 @@ var absTests = []string{
}
func TestAbs(t *testing.T) {
if runtime.GOOS == "windows" {
t.Log("TestAbs disabled on windows")
return
}
oldwd, err := os.Getwd()
if err != nil {
t.Fatal("Getwd failed: ", err)
......
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