diff --git a/computers/commands/cd/init.lua b/computers/commands/cd/init.lua index 4be4e85..925350f 100644 --- a/computers/commands/cd/init.lua +++ b/computers/commands/cd/init.lua @@ -1,7 +1,7 @@ function cd(pos, input, data) local path = computers.devicepath .. "/" .. minetest.hash_node_position(pos) .. data.element.pwd - if input and input ~= "" and not input:find("/") then + if input and input ~= "" and not input:find("/") and not input:find("\\") then if input == ".." then local uri = data.element.pwd:split("/") uri[#uri] = nil diff --git a/computers/commands/mkdir/init.lua b/computers/commands/mkdir/init.lua index 5ecfb87..dad19f7 100644 --- a/computers/commands/mkdir/init.lua +++ b/computers/commands/mkdir/init.lua @@ -1,7 +1,7 @@ function mkdir(pos, input, data) local path = computers.devicepath .. "/" .. minetest.hash_node_position(pos) .. data.element.pwd - if input and input ~= "" and not input:find("/") then + if input and input ~= "" and not input:find("/") and not input:find("\\") then minetest.mkdir(path .. "/" .. input) return "folder " .. input .. " created" else