Enforces filename string case sensitivity for assets' internal filenames, which avoids the stringtable messing with the case preventing file name case sensitivity issues.

This commit is contained in:
Areloch 2021-08-21 23:12:37 -05:00
parent c04f3ae166
commit cfe122f714
18 changed files with 109 additions and 102 deletions

View file

@ -147,7 +147,7 @@ void ShapeAnimationAsset::initializeAsset(void)
if (!mIsEmbedded)
{
//If we're not embedded, we need to load in our initial shape and do some prepwork
mFilePath = expandAssetFilePath(mFileName);
mFilePath = getOwned() ? expandAssetFilePath(mFileName) : mFilePath;
mSourceShape = ResourceManager::get().load(mFilePath);
@ -177,14 +177,14 @@ void ShapeAnimationAsset::setAnimationFile(const char* pAnimationFile)
AssertFatal(pAnimationFile != NULL, "Cannot use a NULL animation file.");
// Fetch image file.
pAnimationFile = StringTable->insert(pAnimationFile);
pAnimationFile = StringTable->insert(pAnimationFile, true);
// Ignore no change,
if (pAnimationFile == mFileName)
return;
// Update.
mFileName = StringTable->insert(pAnimationFile);
mFileName = getOwned() ? expandAssetFilePath(pAnimationFile) : pAnimationFile;
// Refresh the asset.
refreshAsset();