From 92bbe45dd031c7a14b9ba55a77a27d66cf07b876 Mon Sep 17 00:00:00 2001 From: Darkvater Date: Tue, 20 Feb 2007 00:09:23 +0000 Subject: (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. --- src/strings.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/strings.cpp') diff --git a/src/strings.cpp b/src/strings.cpp index d794e9c97..d1ab5df0c 100644 --- a/src/strings.cpp +++ b/src/strings.cpp @@ -1164,7 +1164,7 @@ static int GetLanguageList(char **languages, int max) struct dirent *dirent; int num = 0; - dir = opendir(_paths.lang_dir); + dir = ttd_opendir(_paths.lang_dir); if (dir != NULL) { while ((dirent = readdir(dir)) != NULL) { const char *d_name = FS2OTTD(dirent->d_name); -- cgit v1.2.3-54-g00ecf