Skip to content

Commit

Permalink
Localize mkdir helper
Browse files Browse the repository at this point in the history
  • Loading branch information
ShadowNinja committed Jun 1, 2015
1 parent 163dffc commit 4bd5d56
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions worldedit_commands/init.lua
Expand Up @@ -70,7 +70,7 @@ function worldedit.player_axis(name)
return "z", dir.z > 0 and 1 or -1
end

function worldedit.mkdir(path)
local function mkdir(path)
if minetest.mkdir then
minetest.mkdir(path)
else
Expand Down Expand Up @@ -895,7 +895,7 @@ minetest.register_chatcommand("/save", {

local path = minetest.get_worldpath() .. "/schems"
-- Create directory if it does not already exist
worldedit.mkdir(path)
mkdir(path)

local filename = path .. "/" .. param .. ".we"
local file, err = io.open(filename, "wb")
Expand Down Expand Up @@ -1063,7 +1063,7 @@ minetest.register_chatcommand("/mtschemcreate", {

local path = minetest.get_worldpath() .. "/schems"
-- Create directory if it does not already exist
worldedit.mkdir(path)
mkdir(path)

local filename = path .. "/" .. param .. ".mts"
local ret = minetest.create_schematic(worldedit.pos1[name],
Expand Down

0 comments on commit 4bd5d56

Please sign in to comment.