From cb550b0774fef933032ebb66dedc8ea0341ebcd3 Mon Sep 17 00:00:00 2001 From: Mathias Stearn Date: Wed, 3 Feb 2010 21:07:44 -0500 Subject: [PATCH] mongoimport and mongoexport should open files in text mode --- tools/export.cpp | 2 +- tools/import.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/export.cpp b/tools/export.cpp index fd5e9d31319..aabebf36609 100644 --- a/tools/export.cpp +++ b/tools/export.cpp @@ -54,7 +54,7 @@ public: string dir = outfile.substr( 0 , idx + 1 ); create_directories( dir ); } - ofstream * s = new ofstream( outfile.c_str() , ios_base::out | ios_base::binary ); + ofstream * s = new ofstream( outfile.c_str() , ios_base::out ); fileStream.reset( s ); outPtr = s; if ( ! s->good() ){ diff --git a/tools/import.cpp b/tools/import.cpp index 47cbe32c998..f3eb42e0230 100644 --- a/tools/import.cpp +++ b/tools/import.cpp @@ -135,7 +135,7 @@ public: istream * in = &cin; - ifstream file( filename.c_str() , ios_base::in | ios_base::binary); + ifstream file( filename.c_str() , ios_base::in); if ( filename.size() > 0 && filename != "-" ){ if ( ! exists( filename ) ){