ModuleManager and AssetManager updated for T3D mount system.

Platform file calls replaced with Torque::FS calls when scanning for or loading files.
This commit is contained in:
OTHGMars 2021-01-11 05:03:00 -05:00
parent fd85491ed7
commit 8148bdfcdd
3 changed files with 56 additions and 147 deletions

View file

@ -668,11 +668,8 @@ AssetImportObject* AssetImporter::findImportingAssetByName(String assetName, Ass
ModuleDefinition* AssetImporter::getModuleFromPath(Torque::Path filePath)
{
//We want to ensure it's a full filepath, because the module system internally uses full paths for the module dirs
char fullPath[2048];
Platform::makeFullPathName(filePath.getFullPath().c_str(), fullPath, sizeof(fullPath));
ModuleDefinition* moduleDef = ModuleDatabase.findModuleByFilePath(StringTable->insert(fullPath));
// Use a relative path so modules on mounted file systems will be found.
ModuleDefinition* moduleDef = ModuleDatabase.findModuleByFilePath(Platform::makeRelativePathName(filePath.getFullPath().c_str(), NULL));
return moduleDef;
}