summaryrefslogtreecommitdiff
path: root/src/fios.cpp
diff options
context:
space:
mode:
authorglx <glx@openttd.org>2008-01-22 15:47:40 +0000
committerglx <glx@openttd.org>2008-01-22 15:47:40 +0000
commit1d219ad7b650b606383cb2499fe70397a26cbff3 (patch)
tree5b4058419e1a76d092c2efb1f43ccfe2fadf35e5 /src/fios.cpp
parent22973fc2cedc779c05d39628219ad047ca9eac60 (diff)
downloadopenttd-1d219ad7b650b606383cb2499fe70397a26cbff3.tar.xz
(svn r11945) -Fix: FileExists() failed for non latin paths (win32)
Diffstat (limited to 'src/fios.cpp')
-rw-r--r--src/fios.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/fios.cpp b/src/fios.cpp
index 93ec66174..b34939f32 100644
--- a/src/fios.cpp
+++ b/src/fios.cpp
@@ -19,6 +19,8 @@
#ifdef WIN32
# include <tchar.h>
# include <io.h>
+# define access _taccess
+# define unlink _tunlink
#else
# include <unistd.h>
#endif /* WIN32 */
@@ -202,7 +204,7 @@ bool FileExists(const char *filename)
CloseHandle(hand);
return 0;
#else
- return access(filename, 0) == 0;
+ return access(OTTD2FS(filename), 0) == 0;
#endif
}