[SERVER-36430] mongod.exe seems sensitive to trailing backslash in --dbpath Created: 03/Aug/18 Updated: 27/Oct/23 Resolved: 08/Aug/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Admin |
| Affects Version/s: | 4.0.0 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Michael Garde | Assignee: | Mark Benvenuto |
| Resolution: | Works as Designed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Windows |
||
| Issue Links: |
|
||||||||
| Participants: | |||||||||
| Description |
|
When launching mongod.exe with a trailing backslash in the --dbpath parameter
it fails with
When launching it without the trailing backslash;
it starts with no issues.
I'm not sure what the issue is here, but there is an extra " in the first options log, which looks odd. |
| Comments |
| Comment by Michael Garde [ 07/Aug/18 ] |
|
Of course! The trailing backslash escapes the double quote at the end of the string. You are right this is intended behavior of cmd.exe and not a bug in mongod.exe. I'm actually a bit surprised. that I haven't encountered this scenario before. |
| Comment by Mark Benvenuto [ 06/Aug/18 ] |
|
mgarde the behavior of the " (double quote) character being the last character of path is actually a behavior of cmd.exe and not mongod.exe. When cmd.exe calls mongod.exe in your first case, it passes the string 'c:\Users\USER\Local Documents_kode\MongoDB-data"' (note: I am using single-quotes to wrap the string). MongoDB does not manipulate the string in this case. |
| Comment by Nick Brewer [ 03/Aug/18 ] |
|
mgarde Thanks for your report - I can confirm I'm seeing the same behavior in my testing. I'm passing this along to our Platform team for evaluation. -Nick |