Use correct DB thread for structured data loading (#392)

Co-authored-by: rackover <roxanne@thegamebakers.com>
This commit is contained in:
Louve 2022-07-27 17:06:11 +02:00 committed by GitHub
parent 14181d04d1
commit 088b8ac045
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -198,7 +198,8 @@ namespace Components
// First check if all versions are present
for (int i = 156;; ++i)
{
FileSystem::File definition(Utils::String::VA("%s/%d.json", filename.data(), i));
// We're on DB thread (OnLoad) so use DB thread for FS
FileSystem::File definition(Utils::String::VA("%s/%d.json", filename.data(), i), Game::FsThread::FS_THREAD_DATABASE);
if (!definition.exists()) break;
std::vector<std::vector<std::string>> enumContainer;