mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r11945) -Fix: FileExists() failed for non latin paths (win32)
This commit is contained in:
parent
96a18d859f
commit
7d1e3086b8
|
@ -19,6 +19,8 @@
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
# include <tchar.h>
|
# include <tchar.h>
|
||||||
# include <io.h>
|
# include <io.h>
|
||||||
|
# define access _taccess
|
||||||
|
# define unlink _tunlink
|
||||||
#else
|
#else
|
||||||
# include <unistd.h>
|
# include <unistd.h>
|
||||||
#endif /* WIN32 */
|
#endif /* WIN32 */
|
||||||
|
@ -202,7 +204,7 @@ bool FileExists(const char *filename)
|
||||||
CloseHandle(hand);
|
CloseHandle(hand);
|
||||||
return 0;
|
return 0;
|
||||||
#else
|
#else
|
||||||
return access(filename, 0) == 0;
|
return access(OTTD2FS(filename), 0) == 0;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue