mirror of https://github.com/axmolengine/axmol.git
find .luac first (#17572)
This commit is contained in:
parent
1b46096b15
commit
cab5195ad4
|
@ -259,18 +259,19 @@ int LuaStack::executeScriptFile(const char* filename)
|
||||||
}
|
}
|
||||||
|
|
||||||
FileUtils *utils = FileUtils::getInstance();
|
FileUtils *utils = FileUtils::getInstance();
|
||||||
|
|
||||||
//
|
//
|
||||||
// 1. check .lua suffix
|
// 1. check .luac suffix
|
||||||
// 2. check .luac suffix
|
// 2. check .lua suffix
|
||||||
//
|
//
|
||||||
std::string tmpfilename = buf + NOT_BYTECODE_FILE_EXT;
|
std::string tmpfilename = buf + BYTECODE_FILE_EXT;
|
||||||
if (utils->isFileExist(tmpfilename))
|
if (utils->isFileExist(tmpfilename))
|
||||||
{
|
{
|
||||||
buf = tmpfilename;
|
buf = tmpfilename;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
tmpfilename = buf + BYTECODE_FILE_EXT;
|
tmpfilename = buf + NOT_BYTECODE_FILE_EXT;
|
||||||
if (utils->isFileExist(tmpfilename))
|
if (utils->isFileExist(tmpfilename))
|
||||||
{
|
{
|
||||||
buf = tmpfilename;
|
buf = tmpfilename;
|
||||||
|
|
Loading…
Reference in New Issue