From 1b7a31bd65d4e6bf5e337d6280e3d5319d460bef Mon Sep 17 00:00:00 2001 From: Ethan Yonker Date: Thu, 3 Jul 2014 15:09:22 -0500 Subject: Track backup and restore progress Track backup and restore progress based on the sizes of the files as they are being added to the tar backup file. Update the progress bar based on the sizes of the files. Change-Id: Idf649efa1db3e91830b4b2add86203a3f30042ff --- twrpTarMain/twrpTarMain.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'twrpTarMain') diff --git a/twrpTarMain/twrpTarMain.cpp b/twrpTarMain/twrpTarMain.cpp index b28a42ea7..c1705c79c 100644 --- a/twrpTarMain/twrpTarMain.cpp +++ b/twrpTarMain/twrpTarMain.cpp @@ -47,6 +47,7 @@ int main(int argc, char **argv) { int i, action = 0; unsigned j; string Directory, Tar_Filename; + unsigned long long temp1 = 0, temp2 = 0; #ifndef TW_EXCLUDE_ENCRYPTED_BACKUPS string Password; #endif @@ -142,14 +143,14 @@ int main(int argc, char **argv) { } #endif if (action == 1) { - if (tar.createTarFork() != 0) { + if (tar.createTarFork(&temp1, &temp2) != 0) { sync(); return -1; } sync(); printf("\n\ntar created successfully.\n"); } else if (action == 2) { - if (tar.extractTarFork() != 0) { + if (tar.extractTarFork(&temp1, &temp2) != 0) { sync(); return -1; } -- cgit v1.2.3