summaryrefslogtreecommitdiff
path: root/scripting
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2009-09-24 15:41:31 -0400
committerEliot Horowitz <eliot@10gen.com>2009-09-24 15:41:31 -0400
commit40bf2361076da98f88891efd252de4b21df2a0fd (patch)
treecdb2686981d1e4cf576c347fa362617d165ed271 /scripting
parentfad8b0ca02289ab373587c80bdfd4c248270183e (diff)
downloadmongo-40bf2361076da98f88891efd252de4b21df2a0fd.tar.gz
changed order for older boost
Diffstat (limited to 'scripting')
-rw-r--r--scripting/engine.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/scripting/engine.cpp b/scripting/engine.cpp
index a20a48196af..5c53cdd1f65 100644
--- a/scripting/engine.cpp
+++ b/scripting/engine.cpp
@@ -58,24 +58,25 @@ namespace mongo {
uassert( "compile failed" , func );
return invoke( func , args, timeoutMs );
}
-
+
bool Scope::execFile( const string& filename , bool printResult , bool reportError , bool assertOnError, int timeoutMs ){
path p( filename );
- if ( is_directory( p ) ){
- cerr << "can't read directory [" << filename << "]" << endl;
+
+ if ( ! exists( p ) ){
+ cerr << "file [" << filename << "] doesn't exist" << endl;
if ( assertOnError )
assert( 0 );
return false;
}
-
- if ( ! exists( p ) ){
- cerr << "file [" << filename << "] doesn't exist" << endl;
+
+ if ( is_directory( p ) ){
+ cerr << "can't read directory [" << filename << "]" << endl;
if ( assertOnError )
assert( 0 );
return false;
}
-
+
File f;
f.open( filename.c_str() );