Search for all directories in shorten_filename().
continuous-integration/drone/push Build is passing Details

This commit is contained in:
tastytea 2020-01-06 16:43:14 +01:00
parent 27054d480e
commit 935c84e001
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
1 changed files with 1 additions and 1 deletions

View File

@ -31,7 +31,7 @@ constexpr auto shorten_filename(const string_view &filename)
{
for (const string_view &dir : {"/src/", "/include/"})
{
auto pos{filename.rfind("/src/")};
const auto pos{filename.rfind(dir)};
if (pos != string_view::npos)
{
return filename.substr(pos + dir.size());