From 3e3f842fbe80396f352e65d19f8f7cfd9c1d6e37 Mon Sep 17 00:00:00 2001 From: Ivan Savenko Date: Sun, 6 Oct 2024 17:20:58 +0000 Subject: [PATCH] Respect dependencies when checking for filesystem conflicts --- lib/modding/CModHandler.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/modding/CModHandler.cpp b/lib/modding/CModHandler.cpp index 5e0e4c8d2..15c9d22e4 100644 --- a/lib/modding/CModHandler.cpp +++ b/lib/modding/CModHandler.cpp @@ -346,6 +346,9 @@ void CModHandler::loadModFilesystems() if (leftModName == rightModName) continue; + if (getModDependencies(leftModName).count(rightModName) || getModDependencies(rightModName).count(leftModName)) + continue; + const auto & filter = [](const ResourcePath &path){return path.getType() != EResType::DIRECTORY;}; std::unordered_set leftResources = modFilesystems[leftModName]->getFilteredFiles(filter);