Added error message when CEdit is unable to read a file

dev-ui
krzys-h 2013-12-27 10:50:52 +01:00
parent 3b1efc6558
commit 8b5b2eeaa1
1 changed files with 4 additions and 1 deletions

View File

@ -1466,7 +1466,10 @@ bool CEdit::ReadText(std::string filename, int addSize)
}
file = fopen(fs::path(path).make_preferred().string().c_str(), "rb");
if ( file == NULL ) return false;
if ( file == NULL ) {
CLogger::GetInstancePointer()->Error("Unable to read text from file \"%s\"\n", path.c_str());
return false;
}
fseek(file, 0, SEEK_END);
len = ftell(file);