Skip to content

Commit

Permalink
Замена метода создания папки через os.execute на minetest.mkdir (fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Asethon authored Aug 10, 2022
1 parent 95015b6 commit 1bfaaaa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mods/lord/mega_sl/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ local function table_is_empty(table)
end

minetest.register_chatcommand ("S", {
description = "Сохранитьданные в файл",
description = "Сохранить данные в файл",
params = "<file_name>",
privs = {worldedit = true},
func = function(name, param)
Expand All @@ -15,7 +15,7 @@ minetest.register_chatcommand ("S", {
local path = minetest.get_worldpath() .. "/schems"
local file_mts = path .. "/" .. param .. ".mts"
local file_meta = path .. "/" .. param .. ".meta"
os.execute('mkdir "' .. path .. '"')
minetest.mkdir(path)

local pos1, pos2 = worldedit.pos1[name], worldedit.pos2[name]
if pos1 == nil then minetest.chat_send_player(name, "Не задана первая координата") return
Expand Down

0 comments on commit 1bfaaaa

Please sign in to comment.