(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.
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user