Skip to content
Snippets Groups Projects
Commit 5c1074aa authored by Perttu Ahola's avatar Perttu Ahola
Browse files

Remove block file from disk when saved to database

parent bd720911
No related branches found
No related tags found
No related merge requests found
...@@ -3397,6 +3397,9 @@ void ServerMap::loadBlock(std::string sectordir, std::string blockfile, MapSecto ...@@ -3397,6 +3397,9 @@ void ServerMap::loadBlock(std::string sectordir, std::string blockfile, MapSecto
if(version < SER_FMT_VER_HIGHEST || save_after_load) if(version < SER_FMT_VER_HIGHEST || save_after_load)
{ {
saveBlock(block); 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. // We just loaded it from the disk, so it's up-to-date.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment