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

Bug: 151241369
Test: atest IncrementalServiceTest
Change-Id: I6e7655634de722c46e96e66b58c0c4c8e5098874
This commit is contained in:
Yurii Zubrytskyi
2020-04-22 00:38:21 -07:00
parent 9c5a02c269
commit 529a37d3cb

View File

@@ -44,7 +44,7 @@ bool PathLess::operator()(std::string_view l, std::string_view r) const {
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);