1
0
mirror of https://github.com/OlafvdSpek/ctemplate.git synced 2025-09-28 19:05:49 +08:00

Always load files in binary mode, so \r isn't silently eaten on windows.

This commit is contained in:
csilvers 2011-07-27 01:03:35 +00:00
parent aabfe7bc61
commit 0b97bfccf0

View File

@ -2645,7 +2645,7 @@ bool Template::ReloadIfChangedLocked()
return false; // file's timestamp hasn't changed, so no need to reload
}
File* fp = File::Open(resolved_filename_.c_str(), "rb");
File* fp = File::Open(resolved_filename_.c_str(), "r");
if (fp == NULL) {
LOG(ERROR) << "Can't find file " << resolved_filename_
<< "; skipping" << endl;