Merge pull request #115 from v1ne/win-fix-appending-to-file
winapi/files: Append to files with FILE_APPEND_DATA
This commit is contained in:
commit
2d0fd8b1e6
|
@ -26,7 +26,7 @@ final class WinAPIEventDriverFiles : EventDriverFiles {
|
||||||
import std.utf : toUTF16z;
|
import std.utf : toUTF16z;
|
||||||
|
|
||||||
auto access = mode == FileOpenMode.readWrite || mode == FileOpenMode.createTrunc ? (GENERIC_WRITE | GENERIC_READ) :
|
auto access = mode == FileOpenMode.readWrite || mode == FileOpenMode.createTrunc ? (GENERIC_WRITE | GENERIC_READ) :
|
||||||
mode == FileOpenMode.append ? GENERIC_WRITE : GENERIC_READ;
|
mode == FileOpenMode.append ? FILE_APPEND_DATA : GENERIC_READ;
|
||||||
auto shareMode = FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE;
|
auto shareMode = FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE;
|
||||||
auto creation = mode == FileOpenMode.createTrunc ? CREATE_ALWAYS : mode == FileOpenMode.append? OPEN_ALWAYS : OPEN_EXISTING;
|
auto creation = mode == FileOpenMode.createTrunc ? CREATE_ALWAYS : mode == FileOpenMode.append? OPEN_ALWAYS : OPEN_EXISTING;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue