Skip to content
This repository was archived by the owner on Nov 23, 2022. It is now read-only.

Commit

Permalink
cache: Fix typo in twrp-functions.cpp for A/B devices
Browse files Browse the repository at this point in the history
* without this A/B devices are writing 8MB+ uncompressed logs under persist/cache/recovery which increase in size over time. This can eventually leave persist partition OOM causing other cascading issues like crashing the modem during boot and bootloops.

Change-Id: I0f3aab0eb96804d1be8de965eb2c2e9bb83d5b56
Co-authored-by: Erfan Abdi <[email protected]>
Signed-off-by: Andrew Hexen <[email protected]>
  • Loading branch information
SyberHexen and erfanoabdi committed Oct 30, 2019
1 parent e078e9c commit a895118
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion twrp-functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1240,7 +1240,7 @@ int TWFunc::stream_adb_backup(string &Restore_Name) {

std::string TWFunc::get_cache_dir() {
if (PartitionManager.Find_Partition_By_Path(NON_AB_CACHE_DIR) == NULL) {
if (PartitionManager.Find_Partition_By_Path(NON_AB_CACHE_DIR) == NULL) {
if (PartitionManager.Find_Partition_By_Path(AB_CACHE_DIR) == NULL) {
if (PartitionManager.Find_Partition_By_Path(PERSIST_CACHE_DIR) == NULL) {
LOGINFO("Unable to find a directory to store TWRP logs.");
return "";
Expand Down

0 comments on commit a895118

Please sign in to comment.