diff --git a/Userland/Libraries/LibCore/File.cpp b/Userland/Libraries/LibCore/File.cpp index 2d9cec95cd..be65e1ddc1 100644 --- a/Userland/Libraries/LibCore/File.cpp +++ b/Userland/Libraries/LibCore/File.cpp @@ -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.