fs: Lock when doing case insensitive search

* Dark Souls does fs lookups from different threads
This commit is contained in:
IndecisiveTurtle 2024-08-12 16:38:29 +03:00
parent 27e9026f5d
commit ceb7e300e5
1 changed files with 1 additions and 0 deletions

View File

@ -54,6 +54,7 @@ std::filesystem::path MntPoints::GetHostPath(const std::string& guest_directory)
// If the path does not exist attempt to verify this.
// Retrieve parent path until we find one that exists.
std::scoped_lock lk{m_mutex};
path_parts.clear();
auto current_path = host_path;
while (!std::filesystem::exists(current_path)) {