removed settings and obsolete security handling
This commit is contained in:
parent
93fe1d288a
commit
f8e3a5e72b
@ -157,7 +157,8 @@ end
|
|||||||
|
|
||||||
-- TODO: hopfefully, security will get more relaxed regarding reading directories in the future
|
-- 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 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 worldpath = minetest.get_worldpath();
|
||||||
local d3 = minetest.get_dir_list( worldpath..'/schems', false );
|
local d3 = minetest.get_dir_list( worldpath..'/schems', false );
|
||||||
if( d3 ) then
|
if( d3 ) then
|
||||||
|
@ -62,6 +62,7 @@ end
|
|||||||
-- we only need the function io.open in a version that can read schematic files from diffrent places,
|
-- 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
|
-- even if a secure environment is enforced; this does require an exception for the mod
|
||||||
local ie_io_open = io.open;
|
local ie_io_open = io.open;
|
||||||
|
--[[ does not work anyway
|
||||||
if( minetest.request_insecure_environment ) then
|
if( minetest.request_insecure_environment ) then
|
||||||
local ie, req_ie = _G, minetest.request_insecure_environment
|
local ie, req_ie = _G, minetest.request_insecure_environment
|
||||||
if req_ie then ie = req_ie() end
|
if req_ie then ie = req_ie() end
|
||||||
@ -69,6 +70,7 @@ if( minetest.request_insecure_environment ) then
|
|||||||
ie_io_open = ie.io.open;
|
ie_io_open = ie.io.open;
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
--]]
|
||||||
|
|
||||||
-- only a certain type of files can be read and written
|
-- only a certain type of files can be read and written
|
||||||
save_restore.file_access = function( path, params )
|
save_restore.file_access = function( path, params )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user