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
diff --git a/twrp.cpp b/twrp.cpp
index c6d98c0..50db725 100644
--- a/twrp.cpp
+++ b/twrp.cpp
@@ -371,7 +371,7 @@
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) {