[Lua] Passing full path to luaL_dofile in CCLuaEngine::executeScriptFile.

This commit is contained in:
James Chen 2013-04-27 14:44:20 +08:00
parent 9739477881
commit eb0358fda6
1 changed files with 2 additions and 1 deletions

View File

@ -191,8 +191,9 @@ int CCLuaStack::executeScriptFile(const char* filename)
code.append("\"");
return executeString(code.c_str());
#else
std::string fullPath = CCFileUtils::sharedFileUtils()->fullPathForFilename(filename);
++m_callFromLua;
int nRet = luaL_dofile(m_state, filename);
int nRet = luaL_dofile(m_state, fullPath.c_str());
--m_callFromLua;
CC_ASSERT(m_callFromLua >= 0);
// lua_gc(m_state, LUA_GCCOLLECT, 0);