fix bug 3172: open file in binary mode, otherwise iteration of a binary file with for_each stops early.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_5_X@21221 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Bernhard Roider 2007-10-26 21:45:55 +00:00
parent 6fc3139837
commit ba328852b8

View File

@ -132,7 +132,7 @@ unsigned long sum(FileName const & file)
// a directory may be passed here so we need to test it. (bug 3622)
if (fs::is_directory(filename))
return 0;
ifstream ifs(filename.c_str());
ifstream ifs(filename.c_str(), std::ios_base::in | std::ios_base::binary);
if (!ifs)
return 0;
@ -156,7 +156,7 @@ unsigned long sum(FileName const & file)
// a directory may be passed here so we need to test it. (bug 3622)
if (fs::is_directory(filename))
return 0;
ifstream ifs(filename.c_str());
ifstream ifs(filename.c_str(), std::ios_base::in | std::ios_base::binary);
if (!ifs)
return 0;