Improve backup & wipe exclusion handling
Rename twrpDU.* to exclude.*
Remove global variable for du and replace with partition specific
variables.
Use separate exclusion lists for backups and wiping.
Clean up some includes
Fix some parenthesis in twrp.cpp that I messed up.
Note: twrpTarMain command line utility compiles but probably does
not work correctly yet due to not properly setting part_settings
Change-Id: Idec9c3e6a8782ba53f3420fa79ba33394f4f85fb
diff --git a/partitionmanager.cpp b/partitionmanager.cpp
index b04cc9a..079d476 100644
--- a/partitionmanager.cpp
+++ b/partitionmanager.cpp
@@ -40,7 +40,7 @@
#include "twrp-functions.hpp"
#include "fixContexts.hpp"
#include "twrpDigest.hpp"
-#include "twrpDU.hpp"
+#include "exclude.hpp"
#include "set_metadata.h"
#include "tw_atomic.hpp"
#include "gui/gui.hpp"
@@ -835,9 +835,10 @@
int total_time = (int) difftime(total_stop, total_start);
uint64_t actual_backup_size;
- if (!adbbackup)
- actual_backup_size = du.Get_Folder_Size(part_settings.Backup_Folder);
- else
+ if (!adbbackup) {
+ TWExclude twe;
+ actual_backup_size = twe.Get_Folder_Size(part_settings.Backup_Folder);
+ } else
actual_backup_size = part_settings.file_bytes + part_settings.img_bytes;
actual_backup_size /= (1024LLU * 1024LLU);