diff options
Diffstat (limited to '')
-rw-r--r-- | partition.cpp | 1 | ||||
-rw-r--r-- | partitionmanager.cpp | 16 |
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)"; |