From 935c84e001e58e2411e12707c685a87744f65a87 Mon Sep 17 00:00:00 2001 From: tastytea Date: Mon, 6 Jan 2020 16:43:14 +0100 Subject: Search for all directories in shorten_filename(). --- src/log.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/log.hpp b/src/log.hpp index 286cd07..4d709b4 100644 --- a/src/log.hpp +++ b/src/log.hpp @@ -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()); -- cgit v1.2.3-54-g00ecf