[SERVER-3912] mongo shell creates a new .dbshell file in the current directory on windows(should be user's home directory?) Created: 20/Sep/11  Updated: 11/Jul/16  Resolved: 12/Oct/11

Status: Closed
Project: Core Server
Component/s: Shell
Affects Version/s: 2.0.0
Fix Version/s: 2.1.0

Type: Bug Priority: Minor - P4
Reporter: Robert Stam Assignee: Spencer Brody (Inactive)
Resolution: Done Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows 7 64-bit.


Issue Links:
Duplicate
is duplicated by SERVER-7046 On windows, mongo.exe should be writt... Closed
Backwards Compatibility: Fully Compatible
Operating System: Windows
Participants:

 Description   

Every time the mongo shell is started it results in a copy of .dbshell in the current working directory. This can lead to multiple copies of .dbshell in different directories. It should probably create a single copy of .dbshell in the user's home directory.

To reproduce:

C:\test>dir
Volume in drive C is OS
Volume Serial Number is 2E9C-358E

Directory of C:\test

09/20/2011 02:49 PM <DIR> .
09/20/2011 02:49 PM <DIR> ..
0 File(s) 0 bytes
2 Dir(s) 103,552,892,928 bytes free

C:\test>\mongodb\mongodb-win32-x86_64-2.0.0\bin\mongo.exe
MongoDB shell version: 2.0.0
connecting to: test
>
C:\test>dir
Volume in drive C is OS
Volume Serial Number is 2E9C-358E

Directory of C:\test

09/20/2011 02:49 PM <DIR> .
09/20/2011 02:49 PM <DIR> ..
09/20/2011 02:49 PM 0 .dbshell
1 File(s) 0 bytes
2 Dir(s) 103,552,892,928 bytes free

C:\test>mkdir subdir

C:\test>cd subdir

C:\test\subdir>dir
Volume in drive C is OS
Volume Serial Number is 2E9C-358E

Directory of C:\test\subdir

09/20/2011 02:49 PM <DIR> .
09/20/2011 02:49 PM <DIR> ..
0 File(s) 0 bytes
2 Dir(s) 103,552,892,928 bytes free

C:\test\subdir>\mongodb\mongodb-win32-x86_64-2.0.0\bin\mongo.exe
MongoDB shell version: 2.0.0
connecting to: test
>
C:\test\subdir>dir
Volume in drive C is OS
Volume Serial Number is 2E9C-358E

Directory of C:\test\subdir

09/20/2011 02:49 PM <DIR> .
09/20/2011 02:49 PM <DIR> ..
09/20/2011 02:49 PM 0 .dbshell
1 File(s) 0 bytes
2 Dir(s) 103,552,892,928 bytes free

C:\test\subdir>



 Comments   
Comment by Justin Dearing [ 17/Sep/12 ]

I vote to backport this to the next 2.0 release if there is one. Its low risk, and its a really annoying behavior.

Comment by auto [ 11/Oct/11 ]

Author:

{u'login': u'stbrody', u'name': u'Spencer T Brody', u'email': u'spencer@10gen.com'}

Message: SERVER-3912: Make .dbshell file on windows be in user directory
instead of current directory.
Branch: master
https://github.com/mongodb/mongo/commit/6d573a9a6e2de66241be53f5eef6873ae2cc12f6

Generated at Thu Feb 08 03:04:24 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.