|
|
@ -212,10 +212,6 @@ static FILE *FioFOpenFileSp(const std::string &filename, const char *mode, Searc
|
|
|
|
buf = _searchpaths[sp] + _subdirs[subdir] + filename;
|
|
|
|
buf = _searchpaths[sp] + _subdirs[subdir] + filename;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#if defined(_WIN32)
|
|
|
|
|
|
|
|
if (mode[0] == 'r' && GetFileAttributes(OTTD2FS(buf).c_str()) == INVALID_FILE_ATTRIBUTES) return nullptr;
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
f = fopen(buf.c_str(), mode);
|
|
|
|
f = fopen(buf.c_str(), mode);
|
|
|
|
#if !defined(_WIN32)
|
|
|
|
#if !defined(_WIN32)
|
|
|
|
if (f == nullptr && strtolower(buf, subdir == NO_DIRECTORY ? 0 : _searchpaths[sp].size() - 1) ) {
|
|
|
|
if (f == nullptr && strtolower(buf, subdir == NO_DIRECTORY ? 0 : _searchpaths[sp].size() - 1) ) {
|
|
|
|