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
This commit is contained in:
bigbiff bigbiff
2013-12-19 18:02:44 +00:00
committed by Dees Troy
parent 4d132cabf4
commit 34684ff313
11 changed files with 220 additions and 72 deletions
+5 -1
View File
@@ -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;