Fix migrate.lua non-declared variable

This commit is contained in:
Athozus 2023-03-08 19:31:12 +01:00
parent b8533f14ff
commit 0ce6a2d099
No known key found for this signature in database
GPG key ID: B50895022E8484BF
2 changed files with 1 additions and 3 deletions

View file

@ -1,6 +1,6 @@
function mail.migrate()
local gen_file_v1 = io.open(minetest.get_worldpath().."/mail.db", "r")
if file then
if gen_file_v1 then
mail.migrate_v1_to_v2()
end

View file

@ -1,5 +1,4 @@
mtt.register("send mail", function(callback)
minetest.after(10, function()
-- create "player2"
local auth_handler = minetest.get_auth_handler()
auth_handler.set_password("player2", "")
@ -11,5 +10,4 @@ mtt.register("send mail", function(callback)
local list2 = mail.getPlayerInboxMessages("player2")
assert(list2 ~= nil and #list2 > 0)
callback()
end
end)