1
0
mirror of https://github.com/luanti-org/luanti.git synced 2026-01-13 04:35:28 +01:00

Clean up some filesys code

This commit is contained in:
sfan5
2025-11-20 18:51:00 +01:00
parent 5e91322fad
commit 7594b19644
7 changed files with 118 additions and 96 deletions

View File

@@ -416,7 +416,7 @@ Server::~Server()
// Clean up files
for (auto &it : m_media) {
if (it.second.delete_at_shutdown) {
fs::DeleteSingleFileOrEmptyDirectory(it.second.path);
fs::DeleteSingleFileOrEmptyDirectory(it.second.path, true);
}
}
@@ -2913,7 +2913,7 @@ void Server::stepPendingDynMediaCallbacks(float dtime)
assert(m_media.count(name));
sanity_check(m_media[name].ephemeral);
fs::DeleteSingleFileOrEmptyDirectory(m_media[name].path);
fs::DeleteSingleFileOrEmptyDirectory(m_media[name].path, true);
m_media.erase(name);
}
getScriptIface()->freeDynamicMediaCallback(token);