From 34684ff3138ca32e62754cfca2a0b2116aa9e32d Mon Sep 17 00:00:00 2001 From: bigbiff bigbiff Date: Sun, 1 Dec 2013 21:03:45 -0500 Subject: Create a TWRP Disk Usage Class to retain state about a directory and whether we should skip it in other classes like twrpTar. Moved Get_Folder_Size to this new class. Change-Id: If0a0220f900eb109581f2eeaf7b76e3f7d6886f1 --- partitionmanager.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'partitionmanager.cpp') diff --git a/partitionmanager.cpp b/partitionmanager.cpp index 7634ff047..da11e8dfe 100644 --- a/partitionmanager.cpp +++ b/partitionmanager.cpp @@ -36,6 +36,7 @@ #include "twrp-functions.hpp" #include "fixPermissions.hpp" #include "twrpDigest.hpp" +#include "twrpDU.hpp" #ifdef TW_INCLUDE_CRYPTO #ifdef TW_INCLUDE_JB_CRYPTO @@ -46,6 +47,9 @@ #include "cutils/properties.h" #endif +TWPartitionManager::TWPartitionManager(void) { +} + int TWPartitionManager::Process_Fstab(string Fstab_Filename, bool Display_Error) { FILE *fstabFile; char fstab_line[MAX_FSTAB_LINE_LENGTH]; @@ -772,7 +776,7 @@ int TWPartitionManager::Run_Backup(void) { time(&total_stop); int total_time = (int) difftime(total_stop, total_start); - unsigned long long actual_backup_size = TWFunc::Get_Folder_Size(Full_Backup_Path, true); + uint64_t actual_backup_size = du.Get_Folder_Size(Full_Backup_Path); actual_backup_size /= (1024LLU * 1024LLU); int prev_img_bps, use_compression; -- cgit v1.2.3