Merge "fs_mgr_overlayfs: Trim surrounding "@" from the per mountpoint scratch dir name" into main
This commit is contained in:
commit
e746bc445b
1 changed files with 6 additions and 1 deletions
|
@ -98,7 +98,12 @@ std::string GetEncodedBaseDirForMountPoint(const std::string& mount_point) {
|
|||
if (mount_point.empty() || !android::base::Realpath(mount_point, &normalized_path)) {
|
||||
return "";
|
||||
}
|
||||
return android::base::StringReplace(normalized_path, "/", "@", true);
|
||||
std::string_view sv(normalized_path);
|
||||
if (sv != "/") {
|
||||
android::base::ConsumePrefix(&sv, "/");
|
||||
android::base::ConsumeSuffix(&sv, "/");
|
||||
}
|
||||
return android::base::StringReplace(sv, "/", "@", true);
|
||||
}
|
||||
|
||||
static bool fs_mgr_is_dir(const std::string& path) {
|
||||
|
|
Loading…
Reference in a new issue