Remove insecure environment
It did not delete the empty folder anyway.
This commit is contained in:
parent
6dce241a2a
commit
0958f312e0
@ -116,7 +116,7 @@ API
|
|||||||
|
|
||||||
- **colddb.add_global_tag(db,tag)**
|
- **colddb.add_global_tag(db,tag)**
|
||||||
|
|
||||||
Add an extra folder to the directory and advance the database to the added folder.
|
Adds an extra folder to the directory and advance the database to the added folder.
|
||||||
|
|
||||||
- **colddb.add_tag(db,name,tag)**
|
- **colddb.add_tag(db,name,tag)**
|
||||||
|
|
||||||
|
10
colddb.lua
10
colddb.lua
@ -1,7 +1,5 @@
|
|||||||
colddb = {}
|
colddb = {}
|
||||||
|
|
||||||
local ie = ...
|
|
||||||
|
|
||||||
local function createDir(directory)
|
local function createDir(directory)
|
||||||
return minetest.mkdir(directory)
|
return minetest.mkdir(directory)
|
||||||
end
|
end
|
||||||
@ -98,13 +96,7 @@ function colddb.remove_tag(db,name)
|
|||||||
local wc = delete_path:len()
|
local wc = delete_path:len()
|
||||||
delete_path = delete_path:sub(0,wc-1)
|
delete_path = delete_path:sub(0,wc-1)
|
||||||
db.tags[name] = nil
|
db.tags[name] = nil
|
||||||
local err,msg = os.remove(delete_path)
|
os.remove(delete_path)
|
||||||
if err == nil and ie then
|
|
||||||
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user