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 <erfangplus@gmail.com>
Signed-off-by: Andrew Hexen <SyberHexen@gmail.com>
diff --git a/twrp-functions.cpp b/twrp-functions.cpp
index e6a489f..4386ff6 100755
--- a/twrp-functions.cpp
+++ b/twrp-functions.cpp
@@ -1240,7 +1240,7 @@
 
 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 "";