Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-12220

Docs for SERVER-38066: Shell utils should open files in binary mode

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 4.1.6, 4.0.5
    • manual, Server
    • None

    Description

      Description

      Description:

      The following shell helpers now have the following arguments:
      cat(filePath, [useBinaryMode = false])
      writeFile(filePath, fileContents, [useBinaryMode = false])

      If 'useBinaryMode' is true, files with newline (\n) characters will not be translated into \r\n on Windows.

      Engineering Ticket Description:

      The shell helpers for reading files, cat(), and writing files, writeFile() do not open files in binary mode,  ios::binary. On Windows, this results in \n characters being translated as \r\n.

      If the WiredTiger.turtle file is opened with cat() and written with writeFile(), WiredTiger will be unable to read it because it does not recognize \r characters.

      Scope of changes

      Impact to Other Docs

      MVP (Work and Date)

      Resources (Scope or Design Docs, Invision, etc.)

      Attachments

        Issue Links

          Activity

            People

              kay.kim@mongodb.com Kay Kim (Inactive)
              kay.kim@mongodb.com Kay Kim (Inactive)
              Jess Mokrzecki Jess Mokrzecki
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                4 years, 1 week, 3 days ago