equal
deleted
inserted
replaced
293 if (subdir == NO_DIRECTORY) { |
293 if (subdir == NO_DIRECTORY) { |
294 ttd_strlcpy(buf, filename, lengthof(buf)); |
294 ttd_strlcpy(buf, filename, lengthof(buf)); |
295 } else { |
295 } else { |
296 snprintf(buf, lengthof(buf), "%s%s%s", _searchpaths[sp], _subdirs[subdir], filename); |
296 snprintf(buf, lengthof(buf), "%s%s%s", _searchpaths[sp], _subdirs[subdir], filename); |
297 } |
297 } |
|
298 |
|
299 #if defined(WIN32) |
|
300 if (GetFileAttributes(OTTD2FS(buf)) == -1) return NULL; |
|
301 #endif |
298 |
302 |
299 f = fopen(buf, mode); |
303 f = fopen(buf, mode); |
300 #if !defined(WIN32) |
304 #if !defined(WIN32) |
301 if (f == NULL) { |
305 if (f == NULL) { |
302 strtolower(buf + strlen(_searchpaths[sp]) - 1); |
306 strtolower(buf + strlen(_searchpaths[sp]) - 1); |