better file handling in shell

This commit is contained in:
Eliot Horowitz
2009-08-14 11:06:10 -04:00
parent 974d710128
commit 115e9e42e1
2 changed files with 13 additions and 2 deletions

View File

@@ -271,7 +271,11 @@ int _main(int argc, char* argv[]) {
for (size_t i = 0; i < files.size(); i++) {
mongo::shellUtils::MongoProgramScope s;
if ( files.size() > 1 )
cout << "loading file: " << files[i] << endl;
if ( ! scope->execFile( files[i] , false , true , false ) ){
cout << "failed to load: " << files[i] << endl;
return -3;
}
}