Browse Source

LibCore/System: Do not translate \n <-> \r\n when reading/writing files

on Windows
stasoid 8 months ago
parent
commit
67db10f26e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Libraries/LibCore/SystemWindows.cpp

+ 1 - 1
Libraries/LibCore/SystemWindows.cpp

@@ -23,7 +23,7 @@ ErrorOr<int> 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 = {};