Skip to content

Commit 5c41a91

Browse files
authored
Merge pull request #11657 from kartben/fix_strip_issue
Fix findFileDef incorrectly flagging ambiguities
2 parents 9cb220d + a13284e commit 5c41a91

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/util.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3475,7 +3475,9 @@ FileDef *findFileDef(const FileNameLinkedMap *fnMap,const QCString &n,bool &ambi
34753475
{
34763476
FileDef *fd = fd_p.get();
34773477
QCString fdStripPath = stripFromIncludePath(fd->getPath());
3478-
if (path.isEmpty() || fdStripPath.right(pathStripped.length())==pathStripped)
3478+
if (path.isEmpty() ||
3479+
(!pathStripped.isEmpty() && fdStripPath.endsWith(pathStripped)) ||
3480+
(pathStripped.isEmpty() && fdStripPath.isEmpty()))
34793481
{
34803482
count++;
34813483
lastMatch=fd;

0 commit comments

Comments
 (0)