From 0f4f2c35dbb2ef8b61ea617f6ab98c843f175bcf Mon Sep 17 00:00:00 2001 From: Rochet2 Date: Thu, 3 Aug 2017 17:13:04 +0300 Subject: [PATCH] Disable calling require with file extension for lua_scripts folder --- LuaEngine.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/LuaEngine.cpp b/LuaEngine.cpp index 1131c3d..cc529f2 100644 --- a/LuaEngine.cpp +++ b/LuaEngine.cpp @@ -355,7 +355,7 @@ void Eluna::AddScriptPath(std::string filename, const std::string& fullpath) filename = filename.substr(0, extDot); // check extension and add path to scripts to load - if (ext != ".lua" && ext != ".dll" && ext != ".ext") + if (ext != ".lua" && ext != ".dll" && ext != ".so" && ext != ".ext") return; bool extension = ext == ".ext"; @@ -383,7 +383,6 @@ void Eluna::GetScripts(std::string path) if (boost::filesystem::exists(someDir) && boost::filesystem::is_directory(someDir)) { lua_requirepath += - path + "/?;" + path + "/?.lua;" + path + "/?.ext;" + path + "/?.dll;" + @@ -425,7 +424,6 @@ void Eluna::GetScripts(std::string path) return; lua_requirepath += - path + "/?;" + path + "/?.lua;" + path + "/?.ext;" + path + "/?.dll;" +