Merge pull request #2853 from yunqiangshanbill/gltf-import-bug-fix

Gltf import bug fix
pull/2851/head^2
Kim Kulling 2019-12-28 09:08:34 +01:00 committed by GitHub
commit 58647c8c2e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -325,7 +325,7 @@ inline void Buffer::Read(Value& obj, Asset& r)
} }
else { // Local file else { // Local file
if (byteLength > 0) { if (byteLength > 0) {
std::string dir = !r.mCurrentAssetDir.empty() ? (r.mCurrentAssetDir + "/") : ""; std::string dir = !r.mCurrentAssetDir.empty() ? (r.mCurrentAssetDir) : "";
IOStream* file = r.OpenFile(dir + uri, "rb"); IOStream* file = r.OpenFile(dir + uri, "rb");
if (file) { if (file) {

View File

@ -384,7 +384,7 @@ inline void Buffer::Read(Value& obj, Asset& r)
} }
else { // Local file else { // Local file
if (byteLength > 0) { if (byteLength > 0) {
std::string dir = !r.mCurrentAssetDir.empty() ? (r.mCurrentAssetDir + "/") : ""; std::string dir = !r.mCurrentAssetDir.empty() ? (r.mCurrentAssetDir) : "";
IOStream* file = r.OpenFile(dir + uri, "rb"); IOStream* file = r.OpenFile(dir + uri, "rb");
if (file) { if (file) {