aboutsummaryrefslogtreecommitdiffstats
path: root/nihil.posix/write_file.ccm
diff options
context:
space:
mode:
Diffstat (limited to 'nihil.posix/write_file.ccm')
-rw-r--r--nihil.posix/write_file.ccm2
1 files changed, 1 insertions, 1 deletions
diff --git a/nihil.posix/write_file.ccm b/nihil.posix/write_file.ccm
index 867e0db..ce21e6b 100644
--- a/nihil.posix/write_file.ccm
+++ b/nihil.posix/write_file.ccm
@@ -35,7 +35,7 @@ auto write_file(std::filesystem::path const &filename,
int mode = 0777)
-> std::expected<std::size_t, error>
{
- auto file = co_await open(filename, O_CREAT|O_WRONLY, mode);
+ auto file = co_await open(filename, open_write | open_create, mode);
auto nbytes = co_await write(file, range);
co_return nbytes;
}