mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 20:15:17 +00:00
LibCore: Don't use has_flag() with multiple flags (OpenMode::ReadWrite)
Fixes boot, regressed in a91a49337c
.
This commit is contained in:
parent
1ae8775a1b
commit
c7b60164ed
Notes:
sideshowbarker
2024-07-18 18:18:26 +09:00
Author: https://github.com/alimpfard Commit: https://github.com/SerenityOS/serenity/commit/c7b60164ed9 Pull-request: https://github.com/SerenityOS/serenity/pull/7058
1 changed files with 1 additions and 1 deletions
|
@ -63,7 +63,7 @@ bool File::open_impl(OpenMode mode, mode_t permissions)
|
|||
{
|
||||
VERIFY(!m_filename.is_null());
|
||||
int flags = 0;
|
||||
if (has_flag(mode, OpenMode::ReadWrite)) {
|
||||
if (has_flag(mode, OpenMode::ReadOnly) && has_flag(mode, OpenMode::WriteOnly)) {
|
||||
flags |= O_RDWR | O_CREAT;
|
||||
} else if (has_flag(mode, OpenMode::ReadOnly)) {
|
||||
flags |= O_RDONLY;
|
||||
|
|
Loading…
Add table
Reference in a new issue