From 1474174ba5f02b72e8a9c4d1aed8fa6250183b3f Mon Sep 17 00:00:00 2001 From: agessaman Date: Tue, 3 Mar 2026 18:55:44 -0800 Subject: [PATCH] Refactor path handling in TraceCommand to prevent truncation of return paths - Updated the logic in `TraceCommand` to avoid capping the `path_nodes` after building the reciprocal path, ensuring that the return path is preserved. - Improved clarity in the code by adding a comment to explain the rationale behind the change. --- modules/commands/trace_command.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/commands/trace_command.py b/modules/commands/trace_command.py index 1b7caac..2c977e4 100644 --- a/modules/commands/trace_command.py +++ b/modules/commands/trace_command.py @@ -195,7 +195,7 @@ class TraceCommand(BaseCommand): # Use reciprocal path for tracer (always) or when no path given (so round-trip completes) if is_tracer or path_arg is None: path_nodes = self._build_reciprocal_path(path_nodes) - path_nodes = path_nodes[: self.maximum_hops] + # Do not cap here: outbound was already capped above; truncating would drop the return path if not self.bot.connected or not self.bot.meshcore: await self.send_response(message, "Not connected to radio.")