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.