Skip to content

Commit

Permalink
fix nest issue
Browse files Browse the repository at this point in the history
  • Loading branch information
matcool committed Nov 14, 2024
1 parent 81cd8d1 commit 0e8d4c6
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions loader/src/loader/LoaderImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -505,20 +505,20 @@ void Loader::Impl::loadModGraph(Mod* node, bool early) {
thread::setName("Mod Unzip");
log::loadNest(nest);
auto res = unzipFunction();
auto prevNest = log::saveNest();
log::loadNest(nest);
if (!res) {
this->addProblem({
LoadProblem::Type::UnzipFailed,
node,
res.unwrapErr()
});
log::error("Failed to unzip: {}", res.unwrapErr());
m_refreshingModCount -= 1;
log::loadNest(prevNest);
return;
}
this->queueInMainThread([=, this]() {
this->queueInMainThread([=, this, res = std::move(res)]() {
auto prevNest = log::saveNest();
log::loadNest(nest);
if (!res) {
this->addProblem({
LoadProblem::Type::UnzipFailed,
node,
res.unwrapErr()
});
log::error("Failed to unzip: {}", res.unwrapErr());
m_refreshingModCount -= 1;
log::loadNest(prevNest);
return;
}
loadFunction();
log::loadNest(prevNest);
});
Expand Down

0 comments on commit 0e8d4c6

Please sign in to comment.