@@ 309-311 (lines=3) @@ | ||
306 | $header .= str_repeat(chr(0), 12); |
|
307 | // Compute header checksum |
|
308 | $checksum = str_pad(decoct($this->__computeUnsignedChecksum($header)), 6, "0", STR_PAD_LEFT); |
|
309 | for ($i = 0; $i < 6; ++$i) { |
|
310 | $header[(148 + $i)] = substr($checksum, $i, 1); |
|
311 | } |
|
312 | $header[154] = chr(0); |
|
313 | $header[155] = chr(32); |
|
314 | // Add new tar formatted data to tar file contents |
|
@@ 344-346 (lines=3) @@ | ||
341 | $header .= str_repeat(chr(0), 12); |
|
342 | // Compute header checksum |
|
343 | $checksum = str_pad(decoct($this->__computeUnsignedChecksum($header)), 6, "0", STR_PAD_LEFT); |
|
344 | for ($i = 0; $i < 6; ++$i) { |
|
345 | $header[(148 + $i)] = substr($checksum, $i, 1); |
|
346 | } |
|
347 | $header[154] = chr(0); |
|
348 | $header[155] = chr(32); |
|
349 | // Pad file contents to byte count divisible by 512 |