From 4809d1c5ec3e96cf58055da7ad11c4e6e943c982 Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Fri, 9 Apr 2021 02:22:01 +0900 Subject: [PATCH] wip --- tar.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tar.cc b/tar.cc index 95b92dc5..42ea5c44 100644 --- a/tar.cc +++ b/tar.cc @@ -74,10 +74,10 @@ static void write_pax_hdr(std::ostream &out, const std::string &path) { out.seekp(align_to(out.tellp(), BLOCK_SIZE)); } -static void write_ustar_hdr(std::ostream &out, i64 size) { +static void write_ustar_hdr(std::ostream &out, i64 filesize) { UstarHeader hdr; memcpy(hdr.mode, "0000664", 8); - sprintf(hdr.size, "%011zo", size); + sprintf(hdr.size, "%011zo", filesize); hdr.compute_checksum(); out << std::string_view((char *)&hdr, sizeof(hdr)); }