diff options
author | Max Kellermann <max@duempel.org> | 2015-01-05 23:13:35 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2015-01-05 23:13:35 +0100 |
commit | 81df45a893e8ac459ce10f0514058003027c0830 (patch) | |
tree | a2e0306a1a4bdb9bf16acb462607b6ff8bbfa401 /src/fs/io/FileOutputStream.cxx | |
parent | c1f0708a5d305fa713943c71f6d251466f73dadb (diff) | |
download | mpd-81df45a893e8ac459ce10f0514058003027c0830.tar.gz mpd-81df45a893e8ac459ce10f0514058003027c0830.tar.xz mpd-81df45a893e8ac459ce10f0514058003027c0830.zip |
fs/io/File{Reader,OutputStream}: use OpenFile()
Diffstat (limited to '')
-rw-r--r-- | src/fs/io/FileOutputStream.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/fs/io/FileOutputStream.cxx b/src/fs/io/FileOutputStream.cxx index 819867780..2951149b9 100644 --- a/src/fs/io/FileOutputStream.cxx +++ b/src/fs/io/FileOutputStream.cxx @@ -20,7 +20,6 @@ #include "config.h" #include "FileOutputStream.hxx" #include "fs/FileSystem.hxx" -#include "system/fd_util.h" #include "util/Error.hxx" #ifdef WIN32 @@ -82,9 +81,9 @@ FileOutputStream::Cancel() FileOutputStream::FileOutputStream(Path _path, Error &error) :path(_path), - fd(open_cloexec(path.c_str(), - O_WRONLY|O_CREAT|O_TRUNC, - 0666)) + fd(OpenFile(path, + O_WRONLY|O_CREAT|O_TRUNC, + 0666)) { if (fd < 0) error.FormatErrno("Failed to create %s", path.c_str()); |