summaryrefslogtreecommitdiff
path: root/src/newgrf_config.cpp
diff options
context:
space:
mode:
authorDarkvater <darkvater@openttd.org>2007-02-20 00:09:23 +0000
committerDarkvater <darkvater@openttd.org>2007-02-20 00:09:23 +0000
commit92bbe45dd031c7a14b9ba55a77a27d66cf07b876 (patch)
tree2597b59d39104907743caf0340df546274f0b559 /src/newgrf_config.cpp
parent5b237758aaf4ba5d646ccfad2129312f30bfcfb2 (diff)
downloadopenttd-92bbe45dd031c7a14b9ba55a77a27d66cf07b876.tar.xz
(svn r8821) -Regression: Unable to browse directories on *nix if the filesystem is not in UTF-8 charset and special characters are used. The string passed to opendir() which is UTF-8 was not parsed back to the filesystem format. Use a wrapper called ttd_opendir() instead of redefining opendir itself.
Diffstat (limited to 'src/newgrf_config.cpp')
-rw-r--r--src/newgrf_config.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/newgrf_config.cpp b/src/newgrf_config.cpp
index 583b4773b..6b13ecc2e 100644
--- a/src/newgrf_config.cpp
+++ b/src/newgrf_config.cpp
@@ -274,7 +274,7 @@ static uint ScanPath(const char *path)
struct dirent *dirent;
DIR *dir;
- if ((dir = opendir(path)) == NULL) return 0;
+ if ((dir = ttd_opendir(path)) == NULL) return 0;
while ((dirent = readdir(dir)) != NULL) {
const char *d_name = FS2OTTD(dirent->d_name);