Commit 79ed0650 authored by Dimitri van Heesch's avatar Dimitri van Heesch

Fixed extension matching issue if path contained a dot.

parent 060a5cc1
......@@ -9247,8 +9247,9 @@ static ParserInterface *getParserForFile(const char *fn)
{
QCString fileName=fn;
QCString extension;
int sep = 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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment