summaryrefslogtreecommitdiffstats
path: root/applypatch/applypatch.cpp
diff options
context:
space:
mode:
authorTianjie Xu <xunchang@google.com>2016-10-18 22:37:18 +0200
committerTianjie Xu <xunchang@google.com>2016-10-18 23:22:48 +0200
commit984d7d058e65ddc1b8a1ffc79a5f178ad88dd596 (patch)
tree2f6a5b80d843b8114757fc38d2cb878717d72c43 /applypatch/applypatch.cpp
parentMerge "Change StringValue to use std::string" (diff)
downloadandroid_bootable_recovery-984d7d058e65ddc1b8a1ffc79a5f178ad88dd596.tar
android_bootable_recovery-984d7d058e65ddc1b8a1ffc79a5f178ad88dd596.tar.gz
android_bootable_recovery-984d7d058e65ddc1b8a1ffc79a5f178ad88dd596.tar.bz2
android_bootable_recovery-984d7d058e65ddc1b8a1ffc79a5f178ad88dd596.tar.lz
android_bootable_recovery-984d7d058e65ddc1b8a1ffc79a5f178ad88dd596.tar.xz
android_bootable_recovery-984d7d058e65ddc1b8a1ffc79a5f178ad88dd596.tar.zst
android_bootable_recovery-984d7d058e65ddc1b8a1ffc79a5f178ad88dd596.zip
Diffstat (limited to 'applypatch/applypatch.cpp')
-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);