From ac6a945e268cd66346c8f224a70996a919d60a4b Mon Sep 17 00:00:00 2001 From: Peter Nelson Date: Tue, 23 Apr 2024 17:05:08 +0100 Subject: [PATCH] Revert 2408a68910: Remove work around for an MSVC bug from 17 years ago. (#12557) --- src/fileio.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/fileio.cpp b/src/fileio.cpp index 803baa60f2..6c07e52a93 100644 --- a/src/fileio.cpp +++ b/src/fileio.cpp @@ -212,10 +212,6 @@ static FILE *FioFOpenFileSp(const std::string &filename, const char *mode, Searc 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); #if !defined(_WIN32) if (f == nullptr && strtolower(buf, subdir == NO_DIRECTORY ? 0 : _searchpaths[sp].size() - 1) ) {