Skip to content

Commit f338b91

Browse files
committed
#4483 Fix gltf not opening unicode paths
1 parent 7255933 commit f338b91

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

indra/newview/gltf/accessor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ bool Buffer::prep(Asset& asset)
159159
std::string dir = gDirUtilp->getDirName(asset.mFilename);
160160
std::string bin_file = dir + gDirUtilp->getDirDelimiter() + mUri;
161161

162-
std::ifstream file(bin_file, std::ios::binary);
162+
llifstream file(bin_file.c_str(), std::ios::binary);
163163
if (!file.is_open())
164164
{
165165
LL_WARNS("GLTF") << "Failed to open file: " << bin_file << LL_ENDL;

indra/newview/gltf/asset.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,7 @@ bool Asset::load(std::string_view filename, bool loadIntoVRAM)
696696
mFilename = filename;
697697
std::string ext = gDirUtilp->getExtension(mFilename);
698698

699-
std::ifstream file(filename.data(), std::ios::binary);
699+
llifstream file(filename.data(), std::ios::binary);
700700
if (file.is_open())
701701
{
702702
std::string str((std::istreambuf_iterator<char>(file)), std::istreambuf_iterator<char>());

0 commit comments

Comments
 (0)