]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Don’t collapse empty lines in rewrite_stderr_to_absolute_paths
authorJoel Rosdahl <joel@rosdahl.net>
Mon, 5 Jul 2021 17:10:20 +0000 (19:10 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Mon, 5 Jul 2021 17:10:20 +0000 (19:10 +0200)
src/Util.cpp

index 81b0d86bb21b74e1288f850849a290efe41c7fd0..ed2cb67325afa424a31427ceaedd6b16a85ec26b 100644 (file)
@@ -155,7 +155,8 @@ rewrite_stderr_to_absolute_paths(string_view text)
   static const std::string in_file_included_from = "In file included from ";
 
   std::string result;
-  for (auto line : Util::split_into_views(text, "\n")) {
+  for (auto line :
+       util::Tokenizer(text, "\n", util::Tokenizer::Mode::skip_last_empty)) {
     // Rewrite <path> to <absolute path> in the following two cases, where X may
     // be optional ANSI CSI sequences:
     //