Disable calling require with file extension for lua_scripts folder

This commit is contained in:
Rochet2
2017-08-03 17:13:04 +03:00
parent 86a0ae93f0
commit 0f4f2c35db

View File

@@ -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;" +