aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsapier <Sapier at GMX dot net>2014-04-06 15:20:45 +0200
committersapier <Sapier at GMX dot net>2014-04-09 20:22:21 +0200
commita88c685f0237b0cb0ed8c5d074a214d52d0924a3 (patch)
treec64dac1d74815afb18f81fe6a2546d7dce2a064f /src
parent142e2d3b74ad886eed83b0fc9d6cfea100dae10a (diff)
downloadminetest-a88c685f0237b0cb0ed8c5d074a214d52d0924a3.tar.gz
minetest-a88c685f0237b0cb0ed8c5d074a214d52d0924a3.tar.bz2
minetest-a88c685f0237b0cb0ed8c5d074a214d52d0924a3.zip
Minor fixes for file/modlist download in mainmenu
Diffstat (limited to 'src')
-rw-r--r--src/script/lua_api/l_mainmenu.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/script/lua_api/l_mainmenu.cpp b/src/script/lua_api/l_mainmenu.cpp
index 1a28c9ba0..fbb70c389 100644
--- a/src/script/lua_api/l_mainmenu.cpp
+++ b/src/script/lua_api/l_mainmenu.cpp
@@ -387,11 +387,6 @@ int ModApiMainMenu::l_get_modstore_details(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;
std::string url = "";
try{
@@ -990,6 +985,9 @@ int ModApiMainMenu::l_download_file(lua_State *L)
lua_pushboolean(L,true);
return 1;
}
+ } else {
+ errorstream << "DOWNLOAD denied: " << absolute_destination
+ << " isn't a allowed path" << std::endl;
}
lua_pushboolean(L,false);
return 1;