Skip to content

Commit

Permalink
flags
Browse files Browse the repository at this point in the history
  • Loading branch information
qicosmos committed Jul 4, 2024
1 parent c414e8f commit 9e2d410
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/cinatra/ylt/coro_io/coro_file.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,11 @@ constexpr flags to_flags(std::ios::ios_base::openmode mode) {
access = flags::truncate;

if ((mode & (std::ios::in | std::ios::out)) != 0)
access = flags::read_write;
access = (flags)(flags::create_write | flags::read_write);
else if ((mode & std::ios::out) != 0)
access = flags::create_write;
else if ((mode & std::ios::in) != 0)
access = flags::read_only;
else if ((mode & std::ios::out) != 0)
access = flags::write_only;

return access;
}
Expand Down

0 comments on commit 9e2d410

Please sign in to comment.