summaryrefslogtreecommitdiffstats
path: root/libtar
diff options
context:
space:
mode:
authorEthan Yonker <dees_troy@teamw.in>2016-02-25 20:47:30 +0100
committerDees Troy <dees_troy@teamw.in>2016-03-31 16:44:24 +0200
commit472f506817bb1af2fceb039ba148d15723944562 (patch)
tree187516086121c42b1b671f69b4fc252fe5498b1c /libtar
parentDataManager Updates (diff)
downloadandroid_bootable_recovery-472f506817bb1af2fceb039ba148d15723944562.tar
android_bootable_recovery-472f506817bb1af2fceb039ba148d15723944562.tar.gz
android_bootable_recovery-472f506817bb1af2fceb039ba148d15723944562.tar.bz2
android_bootable_recovery-472f506817bb1af2fceb039ba148d15723944562.tar.lz
android_bootable_recovery-472f506817bb1af2fceb039ba148d15723944562.tar.xz
android_bootable_recovery-472f506817bb1af2fceb039ba148d15723944562.tar.zst
android_bootable_recovery-472f506817bb1af2fceb039ba148d15723944562.zip
Diffstat (limited to '')
-rw-r--r--libtar/extract.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/libtar/extract.c b/libtar/extract.c
index 257e140d5..6a63ff738 100644
--- a/libtar/extract.c
+++ b/libtar/extract.c
@@ -32,6 +32,8 @@
# include "selinux/selinux.h"
#endif
+const unsigned long long progress_size = (unsigned long long)(T_BLOCKSIZE);
+
static int
tar_set_file_perms(TAR *t, const char *realname)
{
@@ -245,6 +247,11 @@ tar_extract_regfile(TAR *t, const char *realname, const int *progress_fd)
close(fdout);
return -1;
}
+ else
+ {
+ if (*progress_fd != 0)
+ write(*progress_fd, &progress_size, sizeof(progress_size));
+ }
}
/* close output file */
@@ -255,12 +262,6 @@ tar_extract_regfile(TAR *t, const char *realname, const int *progress_fd)
printf("### done extracting %s\n", filename);
#endif
- if (*progress_fd != 0)
- {
- unsigned long long file_size = (unsigned long long)(size);
- write(*progress_fd, &file_size, sizeof(file_size));
- }
-
return 0;
}