diff options
author | Ethan Yonker <dees_troy@teamw.in> | 2015-05-18 17:23:03 +0200 |
---|---|---|
committer | Ethan Yonker <dees_troy@teamw.in> | 2015-05-27 16:22:49 +0200 |
commit | eb32b1ff00878e7b01453450fcd04ecb9fcbba52 (patch) | |
tree | a25888903dd6c07d14afa46ccce41d1779b8e975 /partitionmanager.cpp | |
parent | Only include uncrypt if not in system/core (diff) | |
download | android_bootable_recovery-eb32b1ff00878e7b01453450fcd04ecb9fcbba52.tar android_bootable_recovery-eb32b1ff00878e7b01453450fcd04ecb9fcbba52.tar.gz android_bootable_recovery-eb32b1ff00878e7b01453450fcd04ecb9fcbba52.tar.bz2 android_bootable_recovery-eb32b1ff00878e7b01453450fcd04ecb9fcbba52.tar.lz android_bootable_recovery-eb32b1ff00878e7b01453450fcd04ecb9fcbba52.tar.xz android_bootable_recovery-eb32b1ff00878e7b01453450fcd04ecb9fcbba52.tar.zst android_bootable_recovery-eb32b1ff00878e7b01453450fcd04ecb9fcbba52.zip |
Diffstat (limited to '')
-rw-r--r-- | partitionmanager.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/partitionmanager.cpp b/partitionmanager.cpp index ffc17c3a4..055f73697 100644 --- a/partitionmanager.cpp +++ b/partitionmanager.cpp @@ -880,9 +880,13 @@ int TWPartitionManager::Run_Restore(string Restore_Name) { restore_path = Restore_List.substr(start_pos, end_pos - start_pos); restore_part = Find_Partition_By_Path(restore_path); if (restore_part != NULL) { - partition_count++; + if (restore_part->Mount_Read_Only) { + LOGERR("Cannot restore %s -- mounted read only.\n", restore_part->Backup_Display_Name.c_str()); + return false; + } if (check_md5 > 0 && !restore_part->Check_MD5(Restore_Name)) return false; + partition_count++; total_restore_size += restore_part->Get_Restore_Size(Restore_Name); if (restore_part->Has_SubPartition) { std::vector<TWPartition*>::iterator subpart; |