diff --git a/Core/FileSystems/DirectoryFileSystem.cpp b/Core/FileSystems/DirectoryFileSystem.cpp index 611f8b7e65..51dbcc7979 100644 --- a/Core/FileSystems/DirectoryFileSystem.cpp +++ b/Core/FileSystems/DirectoryFileSystem.cpp @@ -21,6 +21,7 @@ #include #include #include +#include #endif #include "FileUtil.h" @@ -55,7 +56,8 @@ static bool FixFilenameCase(const std::string &path, std::string &filename) while (!readdir_r(dirp, (dirent*) &diren, &result) && result) { - if (result->d_namlen != filenameSize) + // Hm, is this check UTF-8 compatible? (size vs strlen) + if (strlen(result->d_name) != filenameSize) continue; size_t i;