From a1a123054f9622a6bb7af30373ff92925d2865d1 Mon Sep 17 00:00:00 2001 From: neru Date: Thu, 9 Apr 2026 23:16:12 -0300 Subject: [PATCH] feat: move dumping to separate thread --- src/unlocker/spoofing.cpp | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/src/unlocker/spoofing.cpp b/src/unlocker/spoofing.cpp index 4799015..d0e3113 100644 --- a/src/unlocker/spoofing.cpp +++ b/src/unlocker/spoofing.cpp @@ -6,6 +6,7 @@ #include #include #include +#include #include @@ -102,16 +103,18 @@ bool Spoofer::parseCatalog(std::string data) return false; } - std::string outPath = utils::getExePath() + "catalog.json"; - std::ofstream file(outPath); - if (file.is_open()) - { - file << data; - file.close(); - Log::verbose("Raw catalog saved to {}", outPath); - } - else - Log::error("Unable to write to catalog.json"); + std::thread t([&data]() { + std::string outPath = utils::getExePath() + "catalog.json"; + std::ofstream file(outPath); + if (file.is_open()) + { + file << data; + file.close(); + Log::verbose("Raw catalog saved to {}", outPath); + } + else + Log::error("Unable to write to catalog.json"); + }); try {