mirror of
https://github.com/mt-mods/mail.git
synced 2025-03-15 06:01:25 +00:00
create mail dir on start/migrate
This commit is contained in:
parent
68a5d61b5d
commit
1d167c2b30
1 changed files with 2 additions and 1 deletions
|
@ -2,11 +2,12 @@
|
|||
-- migrate from mail.db to player-file-based mailbox
|
||||
|
||||
mail.migrate = function()
|
||||
-- create directory, just in case
|
||||
minetest.mkdir(mail.maildir)
|
||||
|
||||
local file = io.open(minetest.get_worldpath().."/mail.db", "r")
|
||||
if file then
|
||||
print("[mail] migrating to new per-player storage")
|
||||
minetest.mkdir(mail.maildir)
|
||||
|
||||
local data = file:read("*a")
|
||||
local oldmails = minetest.deserialize(data)
|
||||
|
|
Loading…
Add table
Reference in a new issue