Skip to content

Commit

Permalink
[Fix] Add O_CREAT flag when creating a file
Browse files Browse the repository at this point in the history
Issue: #4337
  • Loading branch information
vstakhov committed Nov 16, 2022
1 parent 1b8f933 commit ed4f55c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libutil/cxx/file_util.cxx
Expand Up @@ -52,7 +52,7 @@ auto raii_file::open(const char *fname, int flags) -> tl::expected<raii_file, er

auto raii_file::create(const char *fname, int flags, int perms) -> tl::expected<raii_file, error>
{
int oflags = flags;
int oflags = flags|O_CREAT;
#ifdef O_CLOEXEC
oflags |= O_CLOEXEC;
#endif
Expand Down

0 comments on commit ed4f55c

Please sign in to comment.