create mail dir on start/migrate
This commit is contained in:
parent
68a5d61b5d
commit
1d167c2b30
@ -2,11 +2,12 @@
|
|||||||
-- migrate from mail.db to player-file-based mailbox
|
-- migrate from mail.db to player-file-based mailbox
|
||||||
|
|
||||||
mail.migrate = function()
|
mail.migrate = function()
|
||||||
|
-- create directory, just in case
|
||||||
|
minetest.mkdir(mail.maildir)
|
||||||
|
|
||||||
local file = io.open(minetest.get_worldpath().."/mail.db", "r")
|
local file = io.open(minetest.get_worldpath().."/mail.db", "r")
|
||||||
if file then
|
if file then
|
||||||
print("[mail] migrating to new per-player storage")
|
print("[mail] migrating to new per-player storage")
|
||||||
minetest.mkdir(mail.maildir)
|
|
||||||
|
|
||||||
local data = file:read("*a")
|
local data = file:read("*a")
|
||||||
local oldmails = minetest.deserialize(data)
|
local oldmails = minetest.deserialize(data)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user