1
0
mirror of https://github.com/OlafvdSpek/ctemplate.git synced 2025-10-05 19:16:54 +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 e33b9e6b0d
commit 124a686b94

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;