diff --git a/components/vfs/filesystemarchive.cpp b/components/vfs/filesystemarchive.cpp index 206d9aff0c..0caa4c62b9 100644 --- a/components/vfs/filesystemarchive.cpp +++ b/components/vfs/filesystemarchive.cpp @@ -29,14 +29,14 @@ namespace VFS if (mPath.size () > 0 && mPath [prefix - 1] != '\\' && mPath [prefix - 1] != '/') ++prefix; - for (directory_iterator i (mPath); i != end; ++i) + for (directory_iterator i (std::filesystem::u8path(mPath)); i != end; ++i) { if(std::filesystem::is_directory (*i)) continue; - std::string proper = i->path ().string (); + std::u8string proper = i->path ().u8string (); - FileSystemArchiveFile file(proper); + FileSystemArchiveFile file(std::string((char*)proper.c_str(), proper.size())); std::string searchable; @@ -44,7 +44,7 @@ namespace VFS const auto inserted = mIndex.insert(std::make_pair(searchable, file)); if (!inserted.second) - Log(Debug::Warning) << "Warning: found duplicate file for '" << proper << "', please check your file system for two files with the same name in different cases."; + Log(Debug::Warning) << "Warning: found duplicate file for '" << std::string((char*)proper.c_str(), proper.size()) << "', please check your file system for two files with the same name in different cases."; else out[inserted.first->first] = &inserted.first->second; }