summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2018-12-05 23:33:28 +0100
committerTao Bao <tbao@google.com>2018-12-05 23:44:32 +0100
commitbb134b2613aeb4d7d8f9fdfb8d8402158d29d851 (patch)
tree9268b5e1c60b557ca322d78abf2f3d07aa5f5e09
parentuncrypt: Replace a few C-strings with std::string. (diff)
downloadandroid_bootable_recovery-bb134b2613aeb4d7d8f9fdfb8d8402158d29d851.tar
android_bootable_recovery-bb134b2613aeb4d7d8f9fdfb8d8402158d29d851.tar.gz
android_bootable_recovery-bb134b2613aeb4d7d8f9fdfb8d8402158d29d851.tar.bz2
android_bootable_recovery-bb134b2613aeb4d7d8f9fdfb8d8402158d29d851.tar.lz
android_bootable_recovery-bb134b2613aeb4d7d8f9fdfb8d8402158d29d851.tar.xz
android_bootable_recovery-bb134b2613aeb4d7d8f9fdfb8d8402158d29d851.tar.zst
android_bootable_recovery-bb134b2613aeb4d7d8f9fdfb8d8402158d29d851.zip
Diffstat (limited to '')
-rw-r--r--uncrypt/uncrypt.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/uncrypt/uncrypt.cpp b/uncrypt/uncrypt.cpp
index 49d2be3b2..75595ac2c 100644
--- a/uncrypt/uncrypt.cpp
+++ b/uncrypt/uncrypt.cpp
@@ -174,9 +174,7 @@ static std::string FindBlockDevice(const std::string& path, bool* encryptable, b
if (entry.mount_point.empty()) {
continue;
}
- auto len = entry.mount_point.size();
- if (android::base::StartsWith(path, entry.mount_point) &&
- (path[len] == '/' || path[len] == 0)) {
+ if (android::base::StartsWith(path, entry.mount_point + "/")) {
*encrypted = false;
*encryptable = false;
if (entry.is_encryptable() || entry.fs_mgr_flags.file_encryption) {