diff options
author | Tianjie Xu <xunchang@google.com> | 2017-12-01 04:00:12 +0100 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2017-12-01 04:00:12 +0100 |
commit | db20e41b0cd6ebf5e9693b456cafd7430950e434 (patch) | |
tree | 4e1fbf20729dc13e985d26f3b8f4b6c65c98b61e /updater | |
parent | Merge "root: Fix an issue when volume length from fs_mgr is negative." am: 5ce9fe355c (diff) | |
parent | Merge "Detect interrupted update due to power off" (diff) | |
download | android_bootable_recovery-db20e41b0cd6ebf5e9693b456cafd7430950e434.tar android_bootable_recovery-db20e41b0cd6ebf5e9693b456cafd7430950e434.tar.gz android_bootable_recovery-db20e41b0cd6ebf5e9693b456cafd7430950e434.tar.bz2 android_bootable_recovery-db20e41b0cd6ebf5e9693b456cafd7430950e434.tar.lz android_bootable_recovery-db20e41b0cd6ebf5e9693b456cafd7430950e434.tar.xz android_bootable_recovery-db20e41b0cd6ebf5e9693b456cafd7430950e434.tar.zst android_bootable_recovery-db20e41b0cd6ebf5e9693b456cafd7430950e434.zip |
Diffstat (limited to '')
-rw-r--r-- | updater/install.cpp | 6 |
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, [...]) |