Fix applypatch_check failure when applying update on angler
Applypatch_check should be skipped if no sha is specified. As the comments said: "It's okay to specify no sha1s; the check will pass if the LoadFileContents is successful. Useful for reading partitions, where the filename encodes the sha1s." Test: The update package applied on angler successfully. Bug: 32243751 Change-Id: Ib8f3dadf19f745c2dbd350d60da46ab12d75bc87
This commit is contained in:
parent
2b17b24ae5
commit
984d7d058e
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue