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

dbshell (mongo/mongo.exe) should read/write a .dbshell file if it fails to open one in the home folder

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 2.0.7, 2.2.0
    • Component/s: Shell
    • Environment:
      Tested on windows 7
    • ALL

      With mongo 2.0.7 on windows do the follwing:
      SET HOME= %USERPROFILE% then %HOME% is " C:\users\jdearing"

      With mongo 2.2.0 on windows do the follwing:
      SET USERPROFILE= %USERPROFILE% then %USERPROFILE% is " C:\users\jdearing"

      Note the prepended space in both cases. Now if I run mongo it calls CreateFile on "C:\Users\jdearing\Documents\deleteme\ C:\Users\jdearing\.dbshell" as illustrated by procmon:

      9:20:32.8800465 PM mongo.exe 8784 CreateFile C:\Users\jdearing\Documents\deleteme\ C:\Users\jdearing\.dbshell mongo NAME INVALID Desired Access: Generic Read, Disposition: Open, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: N, ShareMode: Read, Write, AllocationSize: n/a

      It doesn't attempt to open a local copy of .dbshell. It probably should.

            backlog-server-platform DO NOT USE - Backlog - Platform Team
            zippy1981 Justin Dearing
            0 Vote for this issue
            5 Start watching this issue