Skip to content

Commit

Permalink
issue #8300: File naming changed in Doxygen 1.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
doxygen committed Jan 4, 2021
1 parent b509708 commit e9ca9dc
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/doxygen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9325,11 +9325,22 @@ static void generateDiskNames()
int first_path_size = static_cast<int>(first.path.size())-1; // -1 to skip trailing slash
int last_path_size = static_cast<int>(last.path.size())-1; // -1 to skip trailing slash
int j=0;
for (int i=0;i<first_path_size && i<last_path_size;i++)
int i=0;
for (i=0;i<first_path_size && i<last_path_size;i++)
{
if (first.path[i]=='/') j=i;
if (first.path[i]!=last.path[i]) break;
}
if (i==first_path_size && i<last_path_size && last.path[i]=='/')
{
// case first='some/path' and last='some/path/more' => match is 'some/path'
j=first_path_size;
}
else if (i==last_path_size && i<first_path_size && first.path[i]=='/')
{
// case first='some/path/more' and last='some/path' => match is 'some/path'
j=last_path_size;
}

// add non-common part of the path to the name
for (auto &fileEntry : fileEntries)
Expand Down

0 comments on commit e9ca9dc

Please sign in to comment.