Sfoglia il codice sorgente

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

on Windows
stasoid 8 mesi fa
parent
commit
67db10f26e
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  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 = {};