Fix native libs loading on Android

This commit is contained in:
Wojtek Figat
2023-03-29 10:32:47 +02:00
parent fd23a61846
commit 94e7531109

View File

@@ -347,8 +347,7 @@ bool Scripting::LoadBinaryModules(const String& path, const String& projectFolde
const auto startTime = DateTime::NowUTC();
#if PLATFORM_ANDROID
// On Android all native binaries are side-by-side with the app
nativePath = StringUtils::GetDirectoryName(Platform::GetExecutableFilePath());
nativePath /= StringUtils::GetFileName(nativePath);
nativePath = String(StringUtils::GetDirectoryName(Platform::GetExecutableFilePath())) / StringUtils::GetFileName(nativePath);
#endif
auto library = Platform::LoadLibrary(nativePath.Get());
if (!library)