From 55b341fc6cbdccee52e42923c13a91eddb5ca97d Mon Sep 17 00:00:00 2001 From: Oliver Hamlet Date: Sat, 1 Mar 2025 08:43:57 +0000 Subject: [PATCH] Fix misleading log message --- src/api/sorting/plugin_graph.cpp | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/api/sorting/plugin_graph.cpp b/src/api/sorting/plugin_graph.cpp index 904ddbe4..b9ef787e 100644 --- a/src/api/sorting/plugin_graph.cpp +++ b/src/api/sorting/plugin_graph.cpp @@ -1042,16 +1042,17 @@ void PluginGraph::AddOverlapEdges() { const auto fromVertex = thisPluginLoadsFirst ? vertex : otherVertex; const auto toVertex = thisPluginLoadsFirst ? otherVertex : vertex; - if (!IsPathCached(fromVertex, toVertex) && - !PathExists(toVertex, fromVertex)) { - AddEdge(fromVertex, toVertex, edgeType); - } else if (logger) { - logger->debug( - "Skipping {} edge from \"{}\" to \"{}\" as it would " - "create a cycle.", - describeEdgeType(edgeType), - GetPlugin(fromVertex).GetName(), - GetPlugin(toVertex).GetName()); + if (!IsPathCached(fromVertex, toVertex)) { + if (!PathExists(toVertex, fromVertex)) { + AddEdge(fromVertex, toVertex, edgeType); + } else if (logger) { + logger->debug( + "Skipping {} edge from \"{}\" to \"{}\" as it would " + "create a cycle.", + describeEdgeType(edgeType), + GetPlugin(fromVertex).GetName(), + GetPlugin(toVertex).GetName()); + } } } }