removed settings and obsolete security handling

master
Sokomine 2017-07-04 18:15:31 +02:00
parent 93fe1d288a
commit f8e3a5e72b
2 changed files with 4 additions and 1 deletions

View File

@ -157,7 +157,8 @@ end
-- TODO: hopfefully, security will get more relaxed regarding reading directories in the future
-- if security is enabled, our options to get schematics are a bit limited
if( minetest.settings:get( 'secure.enable_security' )) then
--if( minetest.settings:get( 'secure.enable_security' )) then
if( minetest.get_dir_list ) then
local worldpath = minetest.get_worldpath();
local d3 = minetest.get_dir_list( worldpath..'/schems', false );
if( d3 ) then

View File

@ -62,6 +62,7 @@ end
-- we only need the function io.open in a version that can read schematic files from diffrent places,
-- even if a secure environment is enforced; this does require an exception for the mod
local ie_io_open = io.open;
--[[ does not work anyway
if( minetest.request_insecure_environment ) then
local ie, req_ie = _G, minetest.request_insecure_environment
if req_ie then ie = req_ie() end
@ -69,6 +70,7 @@ if( minetest.request_insecure_environment ) then
ie_io_open = ie.io.open;
end
end
--]]
-- only a certain type of files can be read and written
save_restore.file_access = function( path, params )