The full executable path, rather than argv[0], is now used when determining whether the executable is fused (resolves issue #1043.)

This commit is contained in:
Alex Szpakowski
2015-05-04 10:38:28 -03:00
parent 60e8cc24bf
commit 811b2db466
12 changed files with 113 additions and 10 deletions
@@ -301,6 +301,12 @@ int w_getRealDirectory(lua_State *L)
return 1;
}
int w_getExecutablePath(lua_State *L)
{
luax_pushstring(L, instance()->getExecutablePath());
return 1;
}
int w_isDirectory(lua_State *L)
{
const char *arg = luaL_checkstring(L, 1);
@@ -699,6 +705,7 @@ static const luaL_Reg functions[] =
{ "getSaveDirectory", w_getSaveDirectory },
{ "getSourceBaseDirectory", w_getSourceBaseDirectory },
{ "getRealDirectory", w_getRealDirectory },
{ "getExecutablePath", w_getExecutablePath },
{ "isDirectory", w_isDirectory },
{ "isFile", w_isFile },
{ "createDirectory", w_createDirectory },