diff --git a/fs_mgr/liblp/partition_opener.cpp b/fs_mgr/liblp/partition_opener.cpp index bb8ec9cb8..3b12213c3 100644 --- a/fs_mgr/liblp/partition_opener.cpp +++ b/fs_mgr/liblp/partition_opener.cpp @@ -26,6 +26,7 @@ #include #include +#include #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;