Merge "Fix applypatch_check failure when applying update on angler" am: 7df1850d37 am: ece0b68ca6
am: 502e34c301

Change-Id: I64648714a96a2d9b734441c15557eb2b1f268f69
diff --git a/applypatch/applypatch.cpp b/applypatch/applypatch.cpp
index cf15560..48e4c83 100644
--- a/applypatch/applypatch.cpp
+++ b/applypatch/applypatch.cpp
@@ -430,7 +430,7 @@
     // 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);