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

Commit ffa89de4 authored by David Anderson's avatar David Anderson Committed by android-build-merger
Browse files

Merge "Handle empty strings in GetPartitionAbsolutePath."

am: fcb8b961

Change-Id: Icb9df749f4fa384350f58335d54d691f37df4d1b
parents 49492bc5 fcb8b961
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@
#include <unistd.h>

#include <android-base/file.h>
#include <android-base/strings.h>

#include "utility.h"

@@ -37,7 +38,7 @@ using android::base::unique_fd;
namespace {

std::string GetPartitionAbsolutePath(const std::string& path) {
    if (path[0] == '/') {
    if (android::base::StartsWith(path, "/")) {
        return path;
    }
    return "/dev/block/by-name/" + path;