mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-07 00:29:15 +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: c7b60164ed
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());
|
VERIFY(!m_filename.is_null());
|
||||||
int flags = 0;
|
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;
|
flags |= O_RDWR | O_CREAT;
|
||||||
} else if (has_flag(mode, OpenMode::ReadOnly)) {
|
} else if (has_flag(mode, OpenMode::ReadOnly)) {
|
||||||
flags |= O_RDONLY;
|
flags |= O_RDONLY;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue