fix shell
This commit is contained in:
@@ -266,7 +266,12 @@ namespace mongo {
|
||||
p = change_extension(p, ".exe");
|
||||
#endif
|
||||
|
||||
if( boost::filesystem::exists(p) ) return p;
|
||||
if( boost::filesystem::exists(p) ){
|
||||
#ifndef _WIN32
|
||||
p = boost::filesystem::initial_path() / p;
|
||||
#endif
|
||||
return p;
|
||||
}
|
||||
|
||||
{
|
||||
boost::filesystem::path t = boost::filesystem::current_path() / p;
|
||||
@@ -337,7 +342,8 @@ namespace mongo {
|
||||
if ( program != "mongod" && program != "mongos" && program != "mongobridge" )
|
||||
port_ = 0;
|
||||
else {
|
||||
cout << "error: a port number is expected when running mongod (etc.) from the shell" << endl;
|
||||
if ( port_ <= 0 )
|
||||
cout << "error: a port number is expected when running mongod (etc.) from the shell" << endl;
|
||||
assert( port_ > 0 );
|
||||
}
|
||||
if ( port_ > 0 && dbs.count( port_ ) != 0 ){
|
||||
|
||||
Reference in New Issue
Block a user