mirror of
https://github.com/OpenMW/openmw.git
synced 2025-03-30 19:36:40 +00:00
Use normalized path in ESM4 reader
This commit is contained in:
parent
74d699c502
commit
2ddc77138a
1 changed files with 7 additions and 5 deletions
|
@ -320,16 +320,18 @@ namespace ESM4
|
|||
std::filesystem::path path = strings / (prefix + language + suffix);
|
||||
if (mVFS != nullptr)
|
||||
{
|
||||
std::string vfsPath = Files::pathToUnicodeString(path);
|
||||
if (!mVFS->exists(vfsPath))
|
||||
VFS::Path::Normalized vfsPath(Files::pathToUnicodeString(path));
|
||||
Files::IStreamPtr stream = mVFS->find(vfsPath);
|
||||
|
||||
if (stream == nullptr)
|
||||
{
|
||||
path = strings / (prefix + altLanguage + suffix);
|
||||
vfsPath = Files::pathToUnicodeString(path);
|
||||
vfsPath = VFS::Path::Normalized(Files::pathToUnicodeString(path));
|
||||
stream = mVFS->find(vfsPath);
|
||||
}
|
||||
|
||||
if (mVFS->exists(vfsPath))
|
||||
if (stream != nullptr)
|
||||
{
|
||||
const Files::IStreamPtr stream = mVFS->get(vfsPath);
|
||||
buildLStringIndex(stringType, *stream);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue