From a13284e3f14946c1f9b8bd1fe57c90fd990f9b54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Cab=C3=A9?= Date: Wed, 9 Jul 2025 23:02:46 +0200 Subject: [PATCH] Fix findFileDef incorrectly flagging ambiguities MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix issues when comparing stripped paths due to improper handling of empty stripped paths. Fixes: doxygen/doxygen#6178 Fixes: doxygen/doxygen#11261 Signed-off-by: Benjamin Cabé --- src/util.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/util.cpp b/src/util.cpp index 5ccf13ffc8d..31365b55615 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -3474,7 +3474,9 @@ FileDef *findFileDef(const FileNameLinkedMap *fnMap,const QCString &n,bool &ambi { FileDef *fd = fd_p.get(); QCString fdStripPath = stripFromIncludePath(fd->getPath()); - if (path.isEmpty() || fdStripPath.right(pathStripped.length())==pathStripped) + if (path.isEmpty() || + (!pathStripped.isEmpty() && fdStripPath.endsWith(pathStripped)) || + (pathStripped.isEmpty() && fdStripPath.isEmpty())) { count++; lastMatch=fd; pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy