Never: write nil to file
This commit is contained in:
parent
19b6648d69
commit
e953987c9c
@ -100,6 +100,9 @@ function colddb.Colddb(dir)
|
|||||||
|
|
||||||
local function save_table(name, _table)
|
local function save_table(name, _table)
|
||||||
minetest.log(string.format("%s/%s.cold", directory, name))
|
minetest.log(string.format("%s/%s.cold", directory, name))
|
||||||
|
if save_table == nil or name == nil then
|
||||||
|
return false
|
||||||
|
end
|
||||||
return minetest.safe_file_write(string.format("%s/%s.cold", directory, name), minetest.serialize(_table))
|
return minetest.safe_file_write(string.format("%s/%s.cold", directory, name), minetest.serialize(_table))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user