From 03e952ec38f549c3a54a053c69ec8573a45dc170 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Mon, 14 Aug 2017 14:09:35 -0700 Subject: [PATCH] fix extension check for get mapping redirect --- assignment-client/src/assets/AssetServer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assignment-client/src/assets/AssetServer.cpp b/assignment-client/src/assets/AssetServer.cpp index c0729dcf53..f82ef702f0 100644 --- a/assignment-client/src/assets/AssetServer.cpp +++ b/assignment-client/src/assets/AssetServer.cpp @@ -278,7 +278,7 @@ void AssetServer::handleGetMappingOperation(ReceivedMessage& message, SharedNode // check if we should re-direct to a baked asset // first, figure out from the mapping extension what type of file this is - auto assetPathExtension = assetPath.right(assetPath.lastIndexOf('.')).toLower(); + auto assetPathExtension = assetPath.mid(assetPath.lastIndexOf('.')).toLower(); QString bakedRootFile; if (BAKEABLE_MODEL_EXTENSIONS.contains(assetPathExtension)) { @@ -286,7 +286,7 @@ void AssetServer::handleGetMappingOperation(ReceivedMessage& message, SharedNode } else if (QImageReader::supportedImageFormats().contains(assetPathExtension.toLocal8Bit())) { bakedRootFile = BAKED_TEXTURE_SIMPLE_NAME; } - + auto originalAssetHash = it->toString(); QString redirectedAssetHash; QString bakedAssetPath;