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

@ -126,15 +126,14 @@ void StateMachineAsset::setStateMachineFile(const char* pStateMachineFile)
// Sanity!
AssertFatal(pStateMachineFile != NULL, "Cannot use a NULL state machine file.");
// Fetch image file.
pStateMachineFile = StringTable->insert(pStateMachineFile);
pStateMachineFile = StringTable->insert(pStateMachineFile, true);
// Ignore no change,
if (pStateMachineFile == mStateMachineFile)
return;
// Update.
mStateMachineFile = StringTable->insert(pStateMachineFile);
mStateMachineFile = getOwned() ? expandAssetFilePath(pStateMachineFile) : pStateMachineFile;
// Refresh the asset.
refreshAsset();
@ -142,12 +141,12 @@ void StateMachineAsset::setStateMachineFile(const char* pStateMachineFile)
void StateMachineAsset::initializeAsset()
{
mStateMachinePath = expandAssetFilePath(mStateMachineFile);
mStateMachinePath = getOwned() ? expandAssetFilePath(mStateMachineFile) : mStateMachinePath;
}
void StateMachineAsset::onAssetRefresh()
{
mStateMachinePath = expandAssetFilePath(mStateMachineFile);
mStateMachinePath = getOwned() ? expandAssetFilePath(mStateMachineFile) : mStateMachinePath;
}