joyent / libuv

Go to
https://github.com/libuv/libuv
3.27k stars 653 forks source link

windows: fix fs_write with nbufs > 1 and offset #1530

Closed unknownbrackets closed 10 years ago

unknownbrackets commented 10 years ago

When multiple bufs are specified, overlapped needs to be advanced manually between each write. Without this, each buf will be written to the same position (if offset is specified.)

ReadFile() automatically advances, but WriteFile() does not.

Since the buf flow seems to have been introduced only in unstable releases, I suppose no one should've been accidentally depending on the previous behavior.

-[Unknown]

unknownbrackets commented 10 years ago

Updated the commit with a test.

-[Unknown]

saghul commented 10 years ago

Thanks Ms/Mr Unknown! ;-) Landed in 6760d51