From: Perttu Ahola Date: Tue, 6 Sep 2011 17:28:45 +0000 (+0300) Subject: Remove block file from disk when saved to database X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=5c1074aa7d568169ab79574b20cd8978ae95cb36;p=zefram%2Fminetest%2Fminetest_engine.git Remove block file from disk when saved to database --- diff --git a/src/map.cpp b/src/map.cpp index 423a07dc..7de79c75 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -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.