about summary refs log tree commit diff
path: root/absl/flags/internal/usage_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'absl/flags/internal/usage_test.cc')
-rw-r--r--absl/flags/internal/usage_test.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/absl/flags/internal/usage_test.cc b/absl/flags/internal/usage_test.cc
index 8538b2b60884..d15e44847ffb 100644
--- a/absl/flags/internal/usage_test.cc
+++ b/absl/flags/internal/usage_test.cc
@@ -67,9 +67,9 @@ static std::string NormalizeFileName(absl::string_view fname) {
   fname = normalized;
 #endif
 
-  auto absl_pos = fname.find("/absl/");
+  auto absl_pos = fname.rfind("absl/");
   if (absl_pos != absl::string_view::npos) {
-    fname = fname.substr(absl_pos + 1);
+    fname = fname.substr(absl_pos);
   }
   return std::string(fname);
 }