Need to keep full asset paths around in LuaIDE (#1470)

This commit is contained in:
Terry Michaels
2021-06-22 07:05:42 -05:00
committed by GitHub
parent 602baa44d9
commit 858dee2210
@@ -1765,16 +1765,8 @@ namespace LUAEditor
return false;
}
//name has the full path in it, we need to convert it to an asset name
AZStd::string projectRoot, databaseRoot, databasePath, databaseFile, fileExtension;
if (!AzFramework::StringFunc::AssetDatabasePath::Split(name.toUtf8().data(), &projectRoot, &databaseRoot, &databasePath, &databaseFile, &fileExtension))
{
AZ_Warning("LUAEditorMainWindow", false, AZStd::string::format("<span severity=\"err\">Path is invalid: '%s'</span>", name.toUtf8().data()).c_str());
return false;
}
AzFramework::StringFunc::Path::Split(name.toUtf8().data(), nullptr, &m_lastOpenFilePath);
AzFramework::StringFunc::AssetDatabasePath::Join(databasePath.c_str(), databaseFile.c_str(), newAssetName);
newAssetName = name.toUtf8().data();
return true;
}