I've got an error related to mod security in my mod and I struggle to fix it. From viewtopic.php?t=12471 I understand that I can't read files from the mod directory after the init stage. But when I try to read a directory content with
Code: Select all
local files = minetest.get_dir_list('examples', false)
Code: Select all
init.lua
Code: Select all
ModError: Failed to load and run script from /home/blac/.minetest/mods/codeblock/init.lua:
Mod security: Blocked attempted read from examples
stack traceback:
[C]: in function 'get_dir_list'
/home/blac/.minetest/mods/codeblock/init.lua:15: in main chunk
Check debug.txt for details.