summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--partitionmanager.cpp2
-rw-r--r--twrpTar.cpp2
2 files changed, 3 insertions, 1 deletions
diff --git a/partitionmanager.cpp b/partitionmanager.cpp
index fc76c1ada..fb3da5aa1 100644
--- a/partitionmanager.cpp
+++ b/partitionmanager.cpp
@@ -611,6 +611,8 @@ bool TWPartitionManager::Backup_Partition(TWPartition* Part, string Backup_Folde
if ((*subpart)->Can_Be_Backed_Up && (*subpart)->Is_SubPartition && (*subpart)->SubPartition_Of == Part->Mount_Point) {
if (!(*subpart)->Backup(Backup_Folder))
return false;
+ sync();
+ sync();
if (!Make_MD5(generate_md5, Backup_Folder, (*subpart)->Backup_FileName))
return false;
if (Part->Backup_Method == 1) {
diff --git a/twrpTar.cpp b/twrpTar.cpp
index 8bfbecd13..59d75d0a2 100644
--- a/twrpTar.cpp
+++ b/twrpTar.cpp
@@ -1251,7 +1251,7 @@ int twrpTar::closeTar() {
LOGERR("Unable to close tar archive: '%s'\n", tarfn.c_str());
return -1;
}
- if (Archive_Current_Type > 1) {
+ if (Archive_Current_Type > 0) {
close(fd);
int status;
if (pigz_pid > 0 && TWFunc::Wait_For_Child(pigz_pid, &status, "pigz") != 0)