1
0
mirror of https://github.com/moparisthebest/minetest synced 2024-11-05 00:45:05 -05:00

Remove block file from disk when saved to database

This commit is contained in:
Perttu Ahola 2011-09-06 20:28:45 +03:00
parent bd72091150
commit 5c1074aa7d

View File

@ -3397,6 +3397,9 @@ void ServerMap::loadBlock(std::string sectordir, std::string blockfile, MapSecto
if(version < SER_FMT_VER_HIGHEST || save_after_load)
{
saveBlock(block);
// Should be in database now, so delete the old file
fs::RecursiveDelete(fullpath);
}
// We just loaded it from the disk, so it's up-to-date.