- Several SaveData functions. Dysmantle and we are doomed should save and load now.

This commit is contained in:
raziel1000 2024-07-04 01:51:46 -06:00
parent 3875c00281
commit 0ecc54032c
7 changed files with 488 additions and 92 deletions

View file

@ -18,7 +18,12 @@ void MntPoints::Mount(const std::filesystem::path& host_folder, const std::strin
m_mnt_pairs.push_back(pair);
}
void MntPoints::Unmount(const std::string& path) {} // TODO!
void MntPoints::Unmount(const std::filesystem::path& host_folder, const std::string& guest_folder) {
auto it = std::remove_if(m_mnt_pairs.begin(), m_mnt_pairs.end(), [&](const MntPair& pair) {
return pair.guest_path == guest_folder;
});
m_mnt_pairs.erase(it, m_mnt_pairs.end());
}
void MntPoints::UnmountAll() {
std::scoped_lock lock{m_mutex};