diff --git a/build_chest_add_schems_by_directory.lua b/build_chest_add_schems_by_directory.lua index b0f93bb..38775f8 100644 --- a/build_chest_add_schems_by_directory.lua +++ b/build_chest_add_schems_by_directory.lua @@ -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 diff --git a/save_restore.lua b/save_restore.lua index 218485a..83a7941 100644 --- a/save_restore.lua +++ b/save_restore.lua @@ -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 )