summaryrefslogtreecommitdiffstats
path: root/updater/install.cpp
diff options
context:
space:
mode:
authorTianjie Xu <xunchang@google.com>2017-11-29 02:23:06 +0100
committerTianjie Xu <xunchang@google.com>2017-12-01 01:25:47 +0100
commit99b73be3a8f3a97ff11f3e50a4169292a2f36fb1 (patch)
treee9880840a1c77ce51810def4d873dad21e5fa9b8 /updater/install.cpp
parentMerge "root: Fix an issue when volume length from fs_mgr is negative." (diff)
downloadandroid_bootable_recovery-99b73be3a8f3a97ff11f3e50a4169292a2f36fb1.tar
android_bootable_recovery-99b73be3a8f3a97ff11f3e50a4169292a2f36fb1.tar.gz
android_bootable_recovery-99b73be3a8f3a97ff11f3e50a4169292a2f36fb1.tar.bz2
android_bootable_recovery-99b73be3a8f3a97ff11f3e50a4169292a2f36fb1.tar.lz
android_bootable_recovery-99b73be3a8f3a97ff11f3e50a4169292a2f36fb1.tar.xz
android_bootable_recovery-99b73be3a8f3a97ff11f3e50a4169292a2f36fb1.tar.zst
android_bootable_recovery-99b73be3a8f3a97ff11f3e50a4169292a2f36fb1.zip
Diffstat (limited to '')
-rw-r--r--updater/install.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/updater/install.cpp b/updater/install.cpp
index a111f4b79..870b85791 100644
--- a/updater/install.cpp
+++ b/updater/install.cpp
@@ -569,7 +569,11 @@ Value* ApplyPatchSpaceFn(const char* name, State* state, const std::vector<std::
name, bytes_str.c_str());
}
- return StringValue(CacheSizeCheck(bytes) ? "" : "t");
+ // Skip the cache size check if the update is a retry.
+ if (state->is_retry || CacheSizeCheck(bytes) == 0) {
+ return StringValue("t");
+ }
+ return StringValue("");
}
// apply_patch(src_file, tgt_file, tgt_sha1, tgt_size, patch1_sha1, patch1_blob, [...])