From 185a85382078919b9c550f56cbb877dd01deb304 Mon Sep 17 00:00:00 2001 From: Coder12a <38924418+Coder12a@users.noreply.github.com> Date: Mon, 5 Nov 2018 21:02:04 -0600 Subject: [PATCH] Bug fix Check_use was happening too fast. --- colddb.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/colddb.lua b/colddb.lua index e1b1db9..dab5cdd 100644 --- a/colddb.lua +++ b/colddb.lua @@ -93,10 +93,10 @@ function colddb.remove_tag(db,name) db.tags[name] = nil local err,msg = os.remove(delete_path) if err == nil and ie then - assert(ie, "Please add colddb to secure.trusted_mods in the settings") - local cmd = string.format("rmdir %s",delete_path) - ie.os.execute(cmd) - cmd = nil + local err,msg = ie.os.remove(delete_path) + if err == nil and ie then + assert(ie, "Please add colddb to secure.trusted_mods in the settings") + end end end end @@ -521,7 +521,7 @@ local function load_into_mem(db,name,_table,tag_name) db.mem_pool[cs].inuse = false db.mem_pool[cs].indexes = db.indexes db.mem_pool[cs].check_timer = true - check_use(db,name,tag_name) + minetest.after(30,check_use,name,tag_name,30,0) end end end