aboutsummaryrefslogtreecommitdiffstats
path: root/src/fs/io/FileOutputStream.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2015-02-10 13:41:09 +0100
committerMax Kellermann <max@duempel.org>2015-02-10 13:41:09 +0100
commit9c83d3c78cb4ae9e36e62160359b60b1f05c4bf5 (patch)
tree41d7fbd7b958ba55865cec5bda93286f73eb73d2 /src/fs/io/FileOutputStream.cxx
parent676dfabc91b5f9b0ff54ce145a34352fe0a43202 (diff)
downloadmpd-9c83d3c78cb4ae9e36e62160359b60b1f05c4bf5.tar.gz
mpd-9c83d3c78cb4ae9e36e62160359b60b1f05c4bf5.tar.xz
mpd-9c83d3c78cb4ae9e36e62160359b60b1f05c4bf5.zip
fs/io/FileOutputStream: use CREATE_ALWAYS instead of TRUNCATE_EXISTING
Fixes yet another breakage of creating the database+state file on Windows.
Diffstat (limited to '')
-rw-r--r--src/fs/io/FileOutputStream.cxx2
1 files changed, 1 insertions, 1 deletions
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))
{