#4483 Fix gltf not opening unicode paths

master
Andrey Kleshchev 2025-08-04 17:47:24 +03:00 committed by Andrey Kleshchev
parent 7255933d2a
commit f338b91f7c
2 changed files with 2 additions and 2 deletions

View File

@ -159,7 +159,7 @@ bool Buffer::prep(Asset& asset)
std::string dir = gDirUtilp->getDirName(asset.mFilename); std::string dir = gDirUtilp->getDirName(asset.mFilename);
std::string bin_file = dir + gDirUtilp->getDirDelimiter() + mUri; std::string bin_file = dir + gDirUtilp->getDirDelimiter() + mUri;
std::ifstream file(bin_file, std::ios::binary); llifstream file(bin_file.c_str(), std::ios::binary);
if (!file.is_open()) if (!file.is_open())
{ {
LL_WARNS("GLTF") << "Failed to open file: " << bin_file << LL_ENDL; LL_WARNS("GLTF") << "Failed to open file: " << bin_file << LL_ENDL;

View File

@ -696,7 +696,7 @@ bool Asset::load(std::string_view filename, bool loadIntoVRAM)
mFilename = filename; mFilename = filename;
std::string ext = gDirUtilp->getExtension(mFilename); std::string ext = gDirUtilp->getExtension(mFilename);
std::ifstream file(filename.data(), std::ios::binary); llifstream file(filename.data(), std::ios::binary);
if (file.is_open()) if (file.is_open())
{ {
std::string str((std::istreambuf_iterator<char>(file)), std::istreambuf_iterator<char>()); std::string str((std::istreambuf_iterator<char>(file)), std::istreambuf_iterator<char>());