fix for not having . in path

This commit is contained in:
Eliot Horowitz
2009-02-07 10:35:57 -05:00
parent 5b8a108923
commit 82f5e84538
2 changed files with 8 additions and 1 deletions

View File

@@ -247,7 +247,13 @@ v8::Handle< v8::Value > StartMongod( const v8::Arguments &a ) {
int port = -1;
char * argv[ a.Length() + 2 ];
argv[ 0 ] = copyString( mongod.native_file_string().c_str() );
{
string s = mongod.native_file_string();
if ( s == "mongod" )
s = "./" + s;
argv[ 0 ] = copyString( s.c_str() );
}
for( int i = 0; i < a.Length(); ++i ) {
v8::String::Utf8Value str( a[ i ] );
char *s = copyString( *str );