[incfs] Fix bad path::join() path preparation

Bug: 151241369
Test: atest IncrementalServiceTest
Change-Id: I6e7655634de722c46e96e66b58c0c4c8e5098874
diff --git a/services/incremental/path.cpp b/services/incremental/path.cpp
index 0d86f2a..338659d 100644
--- a/services/incremental/path.cpp
+++ b/services/incremental/path.cpp
@@ -44,7 +44,7 @@
                                         PathCharsLess());
 }
 
-static void preparePathComponent(std::string_view path, bool trimFront) {
+static void preparePathComponent(std::string_view& path, bool trimFront) {
     if (trimFront) {
         while (!path.empty() && path.front() == '/') {
             path.remove_prefix(1);