mirror of
https://github.com/minetest/minetest.git
synced 2025-07-06 09:50:23 +02:00
Fix mods folder being read twice with RUN_IN_PLACE=1 (#15024)
This commit is contained in:
@ -675,10 +675,12 @@ int ModApiMainMenu::l_get_modpaths(lua_State *L)
|
||||
ModApiMainMenu::l_get_modpath(L);
|
||||
lua_setfield(L, -2, "mods");
|
||||
|
||||
std::string modpath = fs::RemoveRelativePathComponents(
|
||||
porting::path_share + DIR_DELIM + "mods" + DIR_DELIM);
|
||||
lua_pushstring(L, modpath.c_str());
|
||||
lua_setfield(L, -2, "share");
|
||||
if (porting::path_share != porting::path_user) {
|
||||
std::string modpath = fs::RemoveRelativePathComponents(
|
||||
porting::path_share + DIR_DELIM + "mods" + DIR_DELIM);
|
||||
lua_pushstring(L, modpath.c_str());
|
||||
lua_setfield(L, -2, "share");
|
||||
}
|
||||
|
||||
for (const std::string &component : getEnvModPaths()) {
|
||||
lua_pushstring(L, component.c_str());
|
||||
|
Reference in New Issue
Block a user