From ceb7e300e572e3aa2ddb51769fb17316e64934b3 Mon Sep 17 00:00:00 2001 From: IndecisiveTurtle <47210458+raphaelthegreat@users.noreply.github.com> Date: Mon, 12 Aug 2024 16:38:29 +0300 Subject: [PATCH] fs: Lock when doing case insensitive search * Dark Souls does fs lookups from different threads --- src/core/file_sys/fs.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/file_sys/fs.cpp b/src/core/file_sys/fs.cpp index 2bcff191..a6d5c3ea 100644 --- a/src/core/file_sys/fs.cpp +++ b/src/core/file_sys/fs.cpp @@ -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)) {