diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2019-05-30 11:25:44 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-30 11:25:44 (GMT) |
commit | f652aa496cd26f3c835a240b9b6abc14437309e5 (patch) | |
tree | 357967421cc055f7d75877074eb341581e97a108 | |
parent | 6ce66ff508b4736d6bd5d6a381786ac44a367fd3 (diff) | |
parent | 497d44273fa5cc619f4289a60a4c1685d7ded241 (diff) | |
download | Doxygen-f652aa496cd26f3c835a240b9b6abc14437309e5.zip Doxygen-f652aa496cd26f3c835a240b9b6abc14437309e5.tar.gz Doxygen-f652aa496cd26f3c835a240b9b6abc14437309e5.tar.bz2 |
Merge pull request #6954 from albert-github/feature/bug_ambig_file
Ambiguous file name in file command
-rw-r--r-- | src/doxygen.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/doxygen.cpp b/src/doxygen.cpp index f4ff579..30c2001 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -766,6 +766,16 @@ static void buildFileList(Entry *root) { bool ambig; FileDef *fd=findFileDef(Doxygen::inputNameDict,root->name,ambig); + if (!fd || ambig) + { + int save_ambig = ambig; + // use the directory of the file to see if the described file is in the same + // directory as the describing file. + QCString fn = root->fileName; + int newIndex=fn.findRev('/'); + fd=findFileDef(Doxygen::inputNameDict,fn.left(newIndex) + "/" + root->name,ambig); + if (!fd) ambig = save_ambig; + } //printf("**************** root->name=%s fd=%p\n",root->name.data(),fd); if (fd && !ambig) { @@ -795,7 +805,7 @@ static void buildFileList(Entry *root) const char *fn = root->fileName.data(); QCString text(4096); text.sprintf("the name `%s' supplied as " - "the second argument in the \\file statement ", + "the argument in the \\file statement ", qPrint(root->name)); if (ambig) // name is ambiguous { |