Fix silly filesystem mounting bug introduced in #14638

Fixes #14650.
This commit is contained in:
Henrik Rydgård 2021-07-27 22:55:02 +02:00
parent 3f1a5a148f
commit f53eb4ae0d
3 changed files with 16 additions and 1 deletions

View file

@ -298,6 +298,15 @@ void MetaFileSystem::UnmountAll() {
currentDir.clear();
}
void MetaFileSystem::Unmount(std::string prefix) {
for (auto iter = fileSystems.begin(); iter != fileSystems.end(); iter++) {
if (iter->prefix == prefix) {
fileSystems.erase(iter);
return;
}
}
}
bool MetaFileSystem::Remount(std::string prefix, std::shared_ptr<IFileSystem> system) {
std::lock_guard<std::recursive_mutex> guard(lock);
for (auto &it : fileSystems) {