From 87734f7ff062f67d807150bc2bab39010f088a5d Mon Sep 17 00:00:00 2001 From: BuckarooBanzay Date: Thu, 10 Sep 2020 17:50:45 +0200 Subject: [PATCH] address the DIR_DELIM issue --- .luacheckrc | 3 --- mesecons/legacy.lua | 2 +- mesecons/util.lua | 4 ++-- mesecons_pistons/init.lua | 2 +- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/.luacheckrc b/.luacheckrc index 373fd7e..cb98a44 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -16,9 +16,6 @@ read_globals = { "vector", "ItemStack", "dump", "VoxelArea", - -- system - "DIR_DELIM", - -- deps "default", "screwdriver", "digiline", "doors" diff --git a/mesecons/legacy.lua b/mesecons/legacy.lua index ad7093a..2a8eae6 100644 --- a/mesecons/legacy.lua +++ b/mesecons/legacy.lua @@ -11,4 +11,4 @@ local old_forceloaded_blocks = mesecon.file2table("mesecon_forceloaded") for hash, _ in pairs(old_forceloaded_blocks) do minetest.forceload_free_block(unhash_blockpos(hash)) end -os.remove(minetest.get_worldpath()..DIR_DELIM.."mesecon_forceloaded") +os.remove(minetest.get_worldpath().."/mesecon_forceloaded") diff --git a/mesecons/util.lua b/mesecons/util.lua index 4259fbc..e57b960 100644 --- a/mesecons/util.lua +++ b/mesecons/util.lua @@ -248,7 +248,7 @@ end -- File writing / reading utilities local wpath = minetest.get_worldpath() function mesecon.file2table(filename) - local f = io.open(wpath..DIR_DELIM..filename, "r") + local f = io.open(wpath.."/"..filename, "r") if f == nil then return {} end local t = f:read("*all") f:close() @@ -257,7 +257,7 @@ function mesecon.file2table(filename) end function mesecon.table2file(filename, table) - local f = io.open(wpath..DIR_DELIM..filename, "w") + local f = io.open(wpath.."/"..filename, "w") f:write(minetest.serialize(table)) f:close() end diff --git a/mesecons_pistons/init.lua b/mesecons_pistons/init.lua index a927003..6a33b24 100644 --- a/mesecons_pistons/init.lua +++ b/mesecons_pistons/init.lua @@ -500,4 +500,4 @@ minetest.register_craft({ -- load legacy code -dofile(minetest.get_modpath("mesecons_pistons")..DIR_DELIM.."legacy.lua") +dofile(minetest.get_modpath("mesecons_pistons").."/legacy.lua")