From 67db10f26ecf483b7e3d4249e48ca223c6c52ef7 Mon Sep 17 00:00:00 2001 From: stasoid Date: Sun, 24 Nov 2024 20:50:39 +0500 Subject: [PATCH] LibCore/System: Do not translate \n <-> \r\n when reading/writing files on Windows --- Libraries/LibCore/SystemWindows.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/LibCore/SystemWindows.cpp b/Libraries/LibCore/SystemWindows.cpp index c4fe2ed1444..a9f6165192f 100644 --- a/Libraries/LibCore/SystemWindows.cpp +++ b/Libraries/LibCore/SystemWindows.cpp @@ -23,7 +23,7 @@ ErrorOr open(StringView path, int options, mode_t mode) { ByteString string_path = path; auto sz_path = string_path.characters(); - int rc = _open(sz_path, options, mode); + int rc = _open(sz_path, options | O_BINARY, mode); if (rc < 0) { int error = errno; struct stat st = {};