mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-06 00:55:50 +00:00
Fix regressions from https://gitlab.com/OpenMW/openmw/-/merge_requests/1917
This commit is contained in:
parent
6a5ad4ca43
commit
bdcac26d8c
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user