From 9c83d3c78cb4ae9e36e62160359b60b1f05c4bf5 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 10 Feb 2015 13:41:09 +0100 Subject: fs/io/FileOutputStream: use CREATE_ALWAYS instead of TRUNCATE_EXISTING Fixes yet another breakage of creating the database+state file on Windows. --- src/fs/io/FileOutputStream.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/fs') diff --git a/src/fs/io/FileOutputStream.cxx b/src/fs/io/FileOutputStream.cxx index 40dadf310..cdaf12ec2 100644 --- a/src/fs/io/FileOutputStream.cxx +++ b/src/fs/io/FileOutputStream.cxx @@ -39,7 +39,7 @@ FileOutputStream::Create(Path path, Error &error) FileOutputStream::FileOutputStream(Path _path, Error &error) :path(_path), handle(CreateFile(path.c_str(), GENERIC_WRITE, 0, nullptr, - TRUNCATE_EXISTING, + CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL|FILE_FLAG_WRITE_THROUGH, nullptr)) { -- cgit v1.2.3