Do not append / to root-level topicNames

This commit is contained in:
Alex Hultman
2021-04-10 23:16:04 +02:00
parent 5df25ffa59
commit 75e2479a9c
+7 -2
View File
@@ -339,8 +339,13 @@ public:
/* Set fullname as parent's name plus our name */
newTopic->fullName.reserve(newTopic->parent->fullName.length() + 1 + segment.length());
newTopic->fullName.append(newTopic->parent->fullName);
newTopic->fullName.append("/");
/* Only append parent's name if parent is not root */
if (newTopic->parent != root) {
newTopic->fullName.append(newTopic->parent->fullName);
newTopic->fullName.append("/");
}
newTopic->fullName.append(segment);
/* For simplicity we do insert wildcards with text */