mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-18 21:45:24 +00:00
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:
parent
6fc3139837
commit
ba328852b8
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user