Directory policy exception
Posted: Tue Jan 12, 2021 18:07
Hi,
Would it be possible to add one exception to the security policy?
Normally Lua scripts can only access files under the world directory. This is very good and perfectly fine except for schematics. Would it be possible to add "schems" folder next to "world" and "mods" folder and add an exception so that Lua scripts could load and save files in this (only one) directory (which is "../../schems" from the world directory)?
Right now it is very problematic to load schematics into multiple worlds, users have to exit the game, create directory and copy files then restart the game. This exception would make it simple, and it poses no security risk (there would be no access to other worlds nor to the mods directory for example). WorldEdit, Schematic Editor etc. then could check for the MTS file in "world/(world)/schems/mtsfile", and if not found then try to load from "schems/mtsfile".
Cheers,
bzt
Would it be possible to add one exception to the security policy?
Normally Lua scripts can only access files under the world directory. This is very good and perfectly fine except for schematics. Would it be possible to add "schems" folder next to "world" and "mods" folder and add an exception so that Lua scripts could load and save files in this (only one) directory (which is "../../schems" from the world directory)?
Right now it is very problematic to load schematics into multiple worlds, users have to exit the game, create directory and copy files then restart the game. This exception would make it simple, and it poses no security risk (there would be no access to other worlds nor to the mods directory for example). WorldEdit, Schematic Editor etc. then could check for the MTS file in "world/(world)/schems/mtsfile", and if not found then try to load from "schems/mtsfile".
Cheers,
bzt