mirror of
https://github.com/glest/glest-source.git
synced 2025-08-15 04:43:58 +02:00
- bugfix for linux variable named wrong
This commit is contained in:
@@ -184,14 +184,14 @@ static inline T* readFromFileReaders(vector<FileReader<T> const *>* readers, con
|
|||||||
int fileErrno = errno;
|
int fileErrno = errno;
|
||||||
ifstream file(fp);
|
ifstream file(fp);
|
||||||
#else
|
#else
|
||||||
ifstream file(friendly_path.c_str(), ios::in | ios::binary);
|
ifstream file(filepath.c_str(), ios::in | ios::binary);
|
||||||
#endif
|
#endif
|
||||||
if (!file.is_open()) { //An error occured; TODO: Which one - throw an exception, print error message?
|
if (!file.is_open()) { //An error occured; TODO: Which one - throw an exception, print error message?
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
DWORD error = GetLastError();
|
DWORD error = GetLastError();
|
||||||
throw runtime_error("Could not open file, result: " + intToStr(error) + " - " + intToStr(fileErrno) + " [" + filepath + "]");
|
throw runtime_error("Could not open file, result: " + intToStr(error) + " - " + intToStr(fileErrno) + " [" + filepath + "]");
|
||||||
#else
|
#else
|
||||||
throw runtime_error("Could not open file [" + friendly_path + "]");
|
throw runtime_error("Could not open file [" + filepath + "]");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
for (typename vector<FileReader<T> const *>::const_iterator i = readers->begin(); i != readers->end(); ++i) {
|
for (typename vector<FileReader<T> const *>::const_iterator i = readers->begin(); i != readers->end(); ++i) {
|
||||||
|
Reference in New Issue
Block a user