|
|
@ -320,16 +320,18 @@ namespace ESM4
|
|
|
|
std::filesystem::path path = strings / (prefix + language + suffix);
|
|
|
|
std::filesystem::path path = strings / (prefix + language + suffix);
|
|
|
|
if (mVFS != nullptr)
|
|
|
|
if (mVFS != nullptr)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
std::string vfsPath = Files::pathToUnicodeString(path);
|
|
|
|
VFS::Path::Normalized vfsPath(Files::pathToUnicodeString(path));
|
|
|
|
if (!mVFS->exists(vfsPath))
|
|
|
|
Files::IStreamPtr stream = mVFS->find(vfsPath);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (stream == nullptr)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
path = strings / (prefix + altLanguage + suffix);
|
|
|
|
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);
|
|
|
|
buildLStringIndex(stringType, *stream);
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|