diff options
author | Alex Buynytskyy <alexbuy@google.com> | 2021-05-12 13:25:38 -0700 |
---|---|---|
committer | Alex Buynytskyy <alexbuy@google.com> | 2021-05-13 12:28:58 -0700 |
commit | 98a3c8fffffc468a5a4943f40a966e7cdc9b5619 (patch) | |
tree | b3a68f98abb185527e5f3c18f20cc75a1569bb9e /services/incremental/path.cpp | |
parent | b5ddeefc099ca947320e2ac8b973ed06d10d37a1 (diff) |
Duplicate apk names on package update.
+minor fixes
Bug: 187710420
Test: atest PackageManagerShellCommandTest PackageManagerShellCommandIncrementalTest
Change-Id: Iced479532b38bddcd8655df3ce08611434965cf4
Diffstat (limited to 'services/incremental/path.cpp')
-rw-r--r-- | services/incremental/path.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/services/incremental/path.cpp b/services/incremental/path.cpp index bf4e9616057c..73e00aed061a 100644 --- a/services/incremental/path.cpp +++ b/services/incremental/path.cpp @@ -171,7 +171,9 @@ std::string_view dirname(std::string_view path) { } details::CStrWrapper::CStrWrapper(std::string_view sv) { - if (sv[sv.size()] == '\0') { + if (!sv.data()) { + mCstr = ""; + } else if (sv[sv.size()] == '\0') { mCstr = sv.data(); } else { mCopy.emplace(sv); |