mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-23 08:00:20 +00:00
LibCore: Fix logic deciding when to open files in non-blocking mode
The if statement for setting the O_NONBLOCK flag was written the other way around, causing Core::File to open files in non-blocking mode, when we didn't actually specify it.
This commit is contained in:
parent
ff970e9295
commit
1367809142
Notes:
sideshowbarker
2024-07-17 07:16:27 +09:00
Author: https://github.com/krkk Commit: https://github.com/SerenityOS/serenity/commit/1367809142 Pull-request: https://github.com/SerenityOS/serenity/pull/18974 Reviewed-by: https://github.com/gmta ✅
1 changed files with 1 additions and 1 deletions
|
@ -85,7 +85,7 @@ int File::open_mode_to_options(OpenMode mode)
|
|||
flags |= O_EXCL;
|
||||
if (!has_flag(mode, OpenMode::KeepOnExec))
|
||||
flags |= O_CLOEXEC;
|
||||
if (!has_flag(mode, OpenMode::Nonblocking))
|
||||
if (has_flag(mode, OpenMode::Nonblocking))
|
||||
flags |= O_NONBLOCK;
|
||||
|
||||
// Some open modes, like `ReadWrite` imply the ability to create the file if it doesn't exist.
|
||||
|
|
Loading…
Reference in a new issue