From a895118a1fb88595d41c7e29b079d9f3c547258c Mon Sep 17 00:00:00 2001 From: SyberHexen Date: Tue, 29 Oct 2019 18:08:16 -0700 Subject: cache: Fix typo in twrp-functions.cpp for A/B devices * 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 Signed-off-by: Andrew Hexen --- twrp-functions.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'twrp-functions.cpp') diff --git a/twrp-functions.cpp b/twrp-functions.cpp index e6a489f35..4386ff6f4 100755 --- a/twrp-functions.cpp +++ b/twrp-functions.cpp @@ -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 ""; -- cgit v1.2.3