summaryrefslogtreecommitdiffstats
path: root/twrpTar.cpp
diff options
context:
space:
mode:
authorDees Troy <dees_troy@teamw.in>2013-10-09 16:45:24 +0200
committerLalit Maganti <lalitmaganti@gmail.com>2013-10-24 21:33:39 +0200
commitf4766921d4865c71c5f93b6bcc45527172934446 (patch)
tree0bb31252e242f6bb5c1248cf24bb3c8329b1572d /twrpTar.cpp
parentUpdate licenses to all match (diff)
downloadandroid_bootable_recovery-f4766921d4865c71c5f93b6bcc45527172934446.tar
android_bootable_recovery-f4766921d4865c71c5f93b6bcc45527172934446.tar.gz
android_bootable_recovery-f4766921d4865c71c5f93b6bcc45527172934446.tar.bz2
android_bootable_recovery-f4766921d4865c71c5f93b6bcc45527172934446.tar.lz
android_bootable_recovery-f4766921d4865c71c5f93b6bcc45527172934446.tar.xz
android_bootable_recovery-f4766921d4865c71c5f93b6bcc45527172934446.tar.zst
android_bootable_recovery-f4766921d4865c71c5f93b6bcc45527172934446.zip
Diffstat (limited to '')
-rw-r--r--twrpTar.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/twrpTar.cpp b/twrpTar.cpp
index 534049f97..eba482ee7 100644
--- a/twrpTar.cpp
+++ b/twrpTar.cpp
@@ -537,6 +537,12 @@ int twrpTar::Generate_Multiple_Archives(string Path) {
{
unsigned long long folder_size = TWFunc::Get_Folder_Size(FileName, false);
if (Archive_Current_Size + folder_size > MAX_ARCHIVE_SIZE) {
+ // Add the root folder first
+ LOGINFO("Adding root folder '%s' before splitting.\n", FileName.c_str());
+ if (addFile(FileName, true) != 0) {
+ LOGERR("Error adding folder '%s' to split archive.\n", FileName.c_str());
+ return -1;
+ }
LOGINFO("Calling Generate_Multiple_Archives\n");
if (Generate_Multiple_Archives(FileName) < 0)
return -1;