Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-36430

mongod.exe seems sensitive to trailing backslash in --dbpath

    • Type: Icon: Bug Bug
    • Resolution: Works as Designed
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 4.0.0
    • Component/s: Admin
    • Labels:
      None
    • Environment:
      Windows

      When launching mongod.exe with a trailing backslash in the --dbpath parameter 

      mongod.exe --dbpath "c:\Users\USER\Local Documents\_kode\MongoDB-data\"

      it fails with

      options: { storage: { dbPath: "c:\Users\sosdagmc\Local Documents\_kode\MongoDB-data"" } }
      exception in initAndListen: NonExistentPath: Data directory c:\Users\USER\Local Documents\_kode\MongoDB-data" not found., terminating
      

      When launching it without the trailing backslash;

      mongod.exe --dbpath "c:\Users\USER\Local Documents\_kode\MongoDB-data"
      

      it starts with no issues.

      options: { storage: { dbPath: "c:\Users\USER\Local Documents\_kode\MongoDB-data" } }
      Detected data files in c:\Users\USER\Local Documents\_kode\MongoDB-data created by the 'wiredTiger' storage engine, so setting the active storage engine to 'wiredTiger'.

      I'm not sure what the issue is here, but there is an extra " in the first options log, which looks odd.

            Assignee:
            mark.benvenuto@mongodb.com Mark Benvenuto
            Reporter:
            mgarde Michael Garde
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: