Only disable recovery flash if it is truly "stock" recovery

 Some roms need the recovery-from-boot.p for auto update
 of recovery. Typically the use install-[romname]-recovery.sh.
 So only disable if install-recovery.sh is present.

Change-Id: I01f89afc87b9d375d67b44b8b5e9228868a47d69
diff --git a/recovery.cpp b/recovery.cpp
index de99393..6409130 100644
--- a/recovery.cpp
+++ b/recovery.cpp
@@ -1161,7 +1161,7 @@
 	// Check for su to see if the device is rooted or not
 	if (PartitionManager.Mount_By_Path("/system", false)) {
 		// Disable flashing of stock recovery
-		if (TWFunc::Path_Exists("/system/recovery-from-boot.p")) {
+		if (TWFunc::Path_Exists("/system/recovery-from-boot.p") && TWFunc::Path_Exists("/system/etc/install-recovery.sh")) {
 			rename("/system/recovery-from-boot.p", "/system/recovery-from-boot.bak");
 			ui_print("Renamed stock recovery file in /system to prevent\nthe stock ROM from replacing TWRP.\n");
 		}
diff --git a/twrp.cpp b/twrp.cpp
index 3e0fc9b..c3baa2e 100644
--- a/twrp.cpp
+++ b/twrp.cpp
@@ -287,7 +287,7 @@
 	// Check for su to see if the device is rooted or not
 	if (PartitionManager.Mount_By_Path("/system", false)) {
 		// Disable flashing of stock recovery
-		if (TWFunc::Path_Exists("/system/recovery-from-boot.p")) {
+		if (TWFunc::Path_Exists("/system/recovery-from-boot.p") && TWFunc::Path_Exists("/system/etc/install-recovery.sh")) {
 			rename("/system/recovery-from-boot.p", "/system/recovery-from-boot.bak");
 			gui_print("Renamed stock recovery file in /system to prevent\nthe stock ROM from replacing TWRP.\n");
 		}