Commit 6a0d4bdd authored by Antoine Cellerier's avatar Antoine Cellerier

Include all authorized lua extensions in module search path too.

parent 16511fee
......@@ -704,10 +704,12 @@ error:
static int vlclua_add_modules_path_inner( lua_State *L, const char *psz_path )
{
/* FIXME: don't use luaL_dostring */
for( const char **ppsz_ext = ppsz_lua_exts; *ppsz_ext; ppsz_ext++ )
{
char *psz_command = NULL;
if( asprintf( &psz_command,
"package.path =[[%s"DIR_SEP"modules"DIR_SEP"?.lua;]]..package.path",
psz_path ) < 0 )
"package.path =[[%s"DIR_SEP"modules"DIR_SEP"?.%s;]]..package.path",
psz_path, *ppsz_ext ) < 0 )
{
return 1;
}
......@@ -718,6 +720,7 @@ static int vlclua_add_modules_path_inner( lua_State *L, const char *psz_path )
return 1;
}
free( psz_command );
}
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment