Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cceb560b authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "fs_mgr_overlayfs: Trim surrounding "@" from the per mountpoint scratch...

Merge "fs_mgr_overlayfs: Trim surrounding "@" from the per mountpoint scratch dir name" into main am: e746bc44

Original change: https://android-review.googlesource.com/c/platform/system/core/+/2902371



Change-Id: I1fc8e51b5ca61dad3439eedf6180d0967f4656d9
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 2537a93a e746bc44
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -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) {