#4660 Unable to upload GLTF+bin with spaces in the name
parent
c3c45e00ab
commit
ac2cbdcc02
|
|
@ -158,6 +158,11 @@ bool Buffer::prep(Asset& asset)
|
|||
{
|
||||
std::string dir = gDirUtilp->getDirName(asset.mFilename);
|
||||
std::string bin_file = dir + gDirUtilp->getDirDelimiter() + mUri;
|
||||
if (!gDirUtilp->fileExists(bin_file))
|
||||
{
|
||||
// Characters might be escaped in the URI
|
||||
bin_file = dir + gDirUtilp->getDirDelimiter() + LLURI::unescape(mUri);
|
||||
}
|
||||
|
||||
llifstream file(bin_file.c_str(), std::ios::binary);
|
||||
if (!file.is_open())
|
||||
|
|
|
|||
|
|
@ -652,6 +652,14 @@ std::string LLGLTFLoader::processTexture(S32 texture_index, const std::string& t
|
|||
filename = filename.substr(pos + 1);
|
||||
}
|
||||
|
||||
std::string dir = gDirUtilp->getDirName(mFilename);
|
||||
std::string full_path = dir + gDirUtilp->getDirDelimiter() + filename;
|
||||
if (!gDirUtilp->fileExists(full_path) && filename.find("data:") == std::string::npos)
|
||||
{
|
||||
// Uri might be escaped
|
||||
filename = LLURI::unescape(filename);
|
||||
}
|
||||
|
||||
LL_INFOS("GLTF_IMPORT") << "Found texture: " << filename << " for material: " << material_name << LL_ENDL;
|
||||
|
||||
LLSD args;
|
||||
|
|
|
|||
Loading…
Reference in New Issue