Commit 81df45a8 authored by Max Kellermann's avatar Max Kellermann

fs/io/File{Reader,OutputStream}: use OpenFile()

parent c1f0708a
......@@ -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,7 +81,7 @@ FileOutputStream::Cancel()
FileOutputStream::FileOutputStream(Path _path, Error &error)
:path(_path),
fd(open_cloexec(path.c_str(),
fd(OpenFile(path,
O_WRONLY|O_CREAT|O_TRUNC,
0666))
{
......
......@@ -19,7 +19,7 @@
#include "config.h"
#include "FileReader.hxx"
#include "system/fd_util.h"
#include "fs/FileSystem.hxx"
#include "util/Error.hxx"
#ifdef WIN32
......@@ -64,7 +64,7 @@ FileReader::Close()
FileReader::FileReader(Path _path, Error &error)
:path(_path),
fd(open_cloexec(path.c_str(),
fd(OpenFile(path,
O_RDONLY,
0))
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment