summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDees_Troy <dees_troy@teamw.in>2013-04-08 15:35:37 +0200
committerDees_Troy <dees_troy@teamw.in>2013-04-08 15:35:37 +0200
commit9e0b71c6adefc638b6b566d805e9f1b38f133f80 (patch)
treeabc3025578341e64b34e48165f8314e0a1d7c9c9
parentImprove automated handlidling of partitions (diff)
downloadandroid_bootable_recovery-9e0b71c6adefc638b6b566d805e9f1b38f133f80.tar
android_bootable_recovery-9e0b71c6adefc638b6b566d805e9f1b38f133f80.tar.gz
android_bootable_recovery-9e0b71c6adefc638b6b566d805e9f1b38f133f80.tar.bz2
android_bootable_recovery-9e0b71c6adefc638b6b566d805e9f1b38f133f80.tar.lz
android_bootable_recovery-9e0b71c6adefc638b6b566d805e9f1b38f133f80.tar.xz
android_bootable_recovery-9e0b71c6adefc638b6b566d805e9f1b38f133f80.tar.zst
android_bootable_recovery-9e0b71c6adefc638b6b566d805e9f1b38f133f80.zip
-rw-r--r--partition.cpp1
-rw-r--r--partitionmanager.cpp16
2 files changed, 13 insertions, 4 deletions
diff --git a/partition.cpp b/partition.cpp
index e88ccc8a0..440553647 100644
--- a/partition.cpp
+++ b/partition.cpp
@@ -333,7 +333,6 @@ bool TWPartition::Process_Fstab_Line(string Line, bool Display_Error) {
if (Mount_Point == "/emmc" || Mount_Point == "/internal_sd" || Mount_Point == "/internal_sdcard") {
Is_Storage = true;
Is_Settings_Storage = true;
- Storage_Path = "/emmc";
Wipe_Available_in_GUI = true;
#ifndef RECOVERY_SDCARD_ON_DATA
Setup_AndSec();
diff --git a/partitionmanager.cpp b/partitionmanager.cpp
index 5c325773a..0bed258ea 100644
--- a/partitionmanager.cpp
+++ b/partitionmanager.cpp
@@ -686,7 +686,7 @@ int TWPartitionManager::Run_Backup(void) {
std::vector<TWPartition*>::iterator subpart;
for (subpart = Partitions.begin(); subpart != Partitions.end(); subpart++) {
- if ((*subpart)->Can_Be_Backed_Up && (*subpart)->Is_SubPartition && (*subpart)->SubPartition_Of == backup_part->Mount_Point) {
+ if ((*subpart)->Can_Be_Backed_Up && (*subpart)->Is_Present && (*subpart)->Is_SubPartition && (*subpart)->SubPartition_Of == backup_part->Mount_Point) {
partition_count++;
if ((*subpart)->Backup_Method == 1)
file_bytes += (*subpart)->Backup_Size;
@@ -1761,10 +1761,20 @@ void TWPartitionManager::Get_Partition_List(string ListType, std::vector<Partiti
}
} else if (ListType == "backup") {
char backup_size[255];
+ unsigned long long Backup_Size;
for (iter = Partitions.begin(); iter != Partitions.end(); iter++) {
- if ((*iter)->Can_Be_Backed_Up && !(*iter)->Is_SubPartition) {
+ if ((*iter)->Can_Be_Backed_Up && !(*iter)->Is_SubPartition && (*iter)->Is_Present) {
struct PartitionList part;
- sprintf(backup_size, "%llu", (*iter)->Backup_Size / 1024 / 1024);
+ Backup_Size = (*iter)->Backup_Size;
+ if ((*iter)->Has_SubPartition) {
+ std::vector<TWPartition*>::iterator subpart;
+
+ for (subpart = Partitions.begin(); subpart != Partitions.end(); subpart++) {
+ if ((*subpart)->Is_SubPartition && (*subpart)->Can_Be_Backed_Up && (*subpart)->Is_Present && (*subpart)->SubPartition_Of == (*iter)->Mount_Point)
+ Backup_Size += (*subpart)->Backup_Size;
+ }
+ }
+ sprintf(backup_size, "%llu", Backup_Size / 1024 / 1024);
part.Display_Name = (*iter)->Backup_Display_Name + " (";
part.Display_Name += backup_size;
part.Display_Name += "MB)";