diff options
-rw-r--r-- | tools/tool.cpp | 8 | ||||
-rw-r--r-- | tools/tool.h | 1 |
2 files changed, 5 insertions, 4 deletions
diff --git a/tools/tool.cpp b/tools/tool.cpp index 1845a727e70..e460f600cef 100644 --- a/tools/tool.cpp +++ b/tools/tool.cpp @@ -358,19 +358,19 @@ namespace mongo { } long long BSONTool::processFile( const path& root ){ - string fileString = root.string(); + _fileName = root.string(); unsigned long long fileLength = file_size( root ); if ( fileLength == 0 ) { - out() << "file " << fileString << " empty, skipping" << endl; + out() << "file " << _fileName << " empty, skipping" << endl; return 0; } - FILE* file = fopen( fileString.c_str() , "rb" ); + FILE* file = fopen( _fileName.c_str() , "rb" ); if ( ! file ){ - log() << "error opening file: " << fileString << endl; + log() << "error opening file: " << _fileName << endl; return 0; } diff --git a/tools/tool.h b/tools/tool.h index d703c6b0fcb..746f09f37d6 100644 --- a/tools/tool.h +++ b/tools/tool.h @@ -101,6 +101,7 @@ namespace mongo { string _db; string _coll; + string _fileName; string _username; string _password; |