summaryrefslogtreecommitdiffstats
path: root/twrp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'twrp.cpp')
-rw-r--r--twrp.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/twrp.cpp b/twrp.cpp
index 3e0fc9b9a..c3baa2e2d 100644
--- a/twrp.cpp
+++ b/twrp.cpp
@@ -287,7 +287,7 @@ int main(int argc, char **argv) {
// 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");
}