summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTianjie Xu <xunchang@google.com>2016-10-19 02:55:33 +0200
committerandroid-build-merger <android-build-merger@google.com>2016-10-19 02:55:33 +0200
commit4e8d032183d5c036aecc5155d2fa0d994255a386 (patch)
tree1339737c98d7115c42f511ebf7da6163f723bfc1
parentMerge "Fix bootloader_message." am: 7c95fe10de am: 83e4e6d35c (diff)
parentMerge "Fix applypatch_check failure when applying update on angler" am: 7df1850d37 (diff)
downloadandroid_bootable_recovery-4e8d032183d5c036aecc5155d2fa0d994255a386.tar
android_bootable_recovery-4e8d032183d5c036aecc5155d2fa0d994255a386.tar.gz
android_bootable_recovery-4e8d032183d5c036aecc5155d2fa0d994255a386.tar.bz2
android_bootable_recovery-4e8d032183d5c036aecc5155d2fa0d994255a386.tar.lz
android_bootable_recovery-4e8d032183d5c036aecc5155d2fa0d994255a386.tar.xz
android_bootable_recovery-4e8d032183d5c036aecc5155d2fa0d994255a386.tar.zst
android_bootable_recovery-4e8d032183d5c036aecc5155d2fa0d994255a386.zip
-rw-r--r--applypatch/applypatch.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/applypatch/applypatch.cpp b/applypatch/applypatch.cpp
index cf155607b..48e4c8386 100644
--- a/applypatch/applypatch.cpp
+++ b/applypatch/applypatch.cpp
@@ -430,7 +430,7 @@ int applypatch_check(const char* filename, const std::vector<std::string>& patch
// partitions, where the filename encodes the sha1s; no need to
// check them twice.)
if (LoadFileContents(filename, &file) != 0 ||
- FindMatchingPatch(file.sha1, patch_sha1_str) < 0) {
+ (patch_sha1_str.size() > 0 && FindMatchingPatch(file.sha1, patch_sha1_str) < 0)) {
printf("file \"%s\" doesn't have any of expected "
"sha1 sums; checking cache\n", filename);