feat: add native Windows hierarchy test harness
This commit is contained in:
@@ -37,7 +37,10 @@ func syncDirectory(path string) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
handle, err := windows.CreateFile(value, windows.GENERIC_READ, windows.FILE_SHARE_READ|windows.FILE_SHARE_WRITE|windows.FILE_SHARE_DELETE, nil, windows.OPEN_EXISTING, windows.FILE_FLAG_BACKUP_SEMANTICS, 0)
|
||||
// FlushFileBuffers requires GENERIC_WRITE even when the handle refers to a
|
||||
// directory. Opening it read-only succeeds, then deterministically fails
|
||||
// the durability barrier with ERROR_ACCESS_DENIED on Windows.
|
||||
handle, err := windows.CreateFile(value, windows.GENERIC_READ|windows.GENERIC_WRITE, windows.FILE_SHARE_READ|windows.FILE_SHARE_WRITE|windows.FILE_SHARE_DELETE, nil, windows.OPEN_EXISTING, windows.FILE_FLAG_BACKUP_SEMANTICS, 0)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user