From b909aae78f8793bb9285f7489fb17c6d0ab54f76 Mon Sep 17 00:00:00 2001 From: Davis Mosenkovs Date: Sat, 26 Sep 2015 13:48:23 -0700 Subject: Fix minor interface bug: No-SU prompt after no-OS prompt When /system is wiped in TWRP and afterwards Reboot -> Recovery is selected the "No OS is installed, are you sure you want to reboot?" prompt appears. After swiping to "Reboot anyway" the "Current ROM is not rooted, do you wish to install SuperSU?" prompt appears. This change removes "Do you wish to install SuperSU" prompt after "No OS installed" prompt. Change-Id: Ie1157afdf5cf1cb81d6647269172d6e63af9f4b0 --- twrp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'twrp.cpp') diff --git a/twrp.cpp b/twrp.cpp index c6d98c025..50db72501 100644 --- a/twrp.cpp +++ b/twrp.cpp @@ -371,7 +371,7 @@ int main(int argc, char **argv) { TWFunc::Disable_Stock_Recovery_Replace(); // Check for su to see if the device is rooted or not if (PartitionManager.Mount_By_Path("/system", false) && DataManager::GetIntValue("tw_mount_system_ro") == 0) { - if (TWFunc::Path_Exists("/supersu/su") && !TWFunc::Path_Exists("/system/bin/su") && !TWFunc::Path_Exists("/system/xbin/su") && !TWFunc::Path_Exists("/system/bin/.ext/.su")) { + if (TWFunc::Path_Exists("/supersu/su") && TWFunc::Path_Exists("/system/bin") && !TWFunc::Path_Exists("/system/bin/su") && !TWFunc::Path_Exists("/system/xbin/su") && !TWFunc::Path_Exists("/system/bin/.ext/.su")) { // Device doesn't have su installed DataManager::SetValue("tw_busy", 1); if (gui_startPage("installsu", 1, 1) != 0) { -- cgit v1.2.3