diff options
author | Perttu Ahola <celeron55@gmail.com> | 2011-09-06 20:28:45 +0300 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2011-09-06 20:28:45 +0300 |
commit | 5c1074aa7d568169ab79574b20cd8978ae95cb36 (patch) | |
tree | 94579c8716164d44c61ccd234c879f1a5ea755b0 /src | |
parent | bd72091150edac9d82beb8a65c25d68becd11aee (diff) | |
download | minetest-5c1074aa7d568169ab79574b20cd8978ae95cb36.tar.gz minetest-5c1074aa7d568169ab79574b20cd8978ae95cb36.tar.bz2 minetest-5c1074aa7d568169ab79574b20cd8978ae95cb36.zip |
Remove block file from disk when saved to database
Diffstat (limited to 'src')
-rw-r--r-- | src/map.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/map.cpp b/src/map.cpp index 423a07dcd..7de79c75d 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. |