Skip to content

Commit

Permalink
Fixed extension matching issue if path contained a dot.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dimitri van Heesch committed Oct 24, 2014
1 parent 060a5cc commit 79ed065
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/doxygen.cpp
Expand Up @@ -9247,8 +9247,9 @@ static ParserInterface *getParserForFile(const char *fn)
{ {
QCString fileName=fn; QCString fileName=fn;
QCString extension; QCString extension;
int sep = fileName.findRev('/');
int ei = fileName.findRev('.'); int ei = fileName.findRev('.');
if (ei!=-1) if (ei!=-1 && (sep==-1 || ei>sep)) // matches dir/file.ext but not dir.1/file
{ {
extension=fileName.right(fileName.length()-ei); extension=fileName.right(fileName.length()-ei);
} }
Expand Down

0 comments on commit 79ed065

Please sign in to comment.