1
0
mirror of https://github.com/moparisthebest/minetest synced 2024-12-24 00:18:53 -05:00

Minor fixes for file/modlist download in mainmenu

This commit is contained in:
sapier 2014-04-06 15:20:45 +02:00
parent 142e2d3b74
commit a88c685f02

View File

@ -387,11 +387,6 @@ int ModApiMainMenu::l_get_modstore_details(lua_State *L)
/******************************************************************************/ /******************************************************************************/
int ModApiMainMenu::l_get_modstore_list(lua_State *L) int ModApiMainMenu::l_get_modstore_list(lua_State *L)
{ {
std::string listtype = "local";
if (!lua_isnone(L,1)) {
listtype = luaL_checkstring(L,1);
}
Json::Value mods; Json::Value mods;
std::string url = ""; std::string url = "";
try{ try{
@ -990,6 +985,9 @@ int ModApiMainMenu::l_download_file(lua_State *L)
lua_pushboolean(L,true); lua_pushboolean(L,true);
return 1; return 1;
} }
} else {
errorstream << "DOWNLOAD denied: " << absolute_destination
<< " isn't a allowed path" << std::endl;
} }
lua_pushboolean(L,false); lua_pushboolean(L,false);
return 1; return 1;