fs/io/FileOutputStream: use CREATE_ALWAYS instead of TRUNCATE_EXISTING
Fixes yet another breakage of creating the database+state file on Windows.
This commit is contained in:
@@ -39,7 +39,7 @@ FileOutputStream::Create(Path path, Error &error)
|
|||||||
FileOutputStream::FileOutputStream(Path _path, Error &error)
|
FileOutputStream::FileOutputStream(Path _path, Error &error)
|
||||||
:path(_path),
|
:path(_path),
|
||||||
handle(CreateFile(path.c_str(), GENERIC_WRITE, 0, nullptr,
|
handle(CreateFile(path.c_str(), GENERIC_WRITE, 0, nullptr,
|
||||||
TRUNCATE_EXISTING,
|
CREATE_ALWAYS,
|
||||||
FILE_ATTRIBUTE_NORMAL|FILE_FLAG_WRITE_THROUGH,
|
FILE_ATTRIBUTE_NORMAL|FILE_FLAG_WRITE_THROUGH,
|
||||||
nullptr))
|
nullptr))
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user