Skip to content
Snippets Groups Projects
Commit cb70b76c authored by Andreas Gohr's avatar Andreas Gohr
Browse files

fix lone zero block in TarLib created archives

parent d922c552
No related branches found
No related tags found
No related merge requests found
...@@ -715,8 +715,16 @@ class TarLib { ...@@ -715,8 +715,16 @@ class TarLib {
return $r; return $r;
} }
/**
* Add the closing footer to the archive
*
* Physically, an archive consists of a series of file entries terminated by an end-of-archive entry, which
* consists of two 512 blocks of zero bytes
* @link http://www.gnu.org/software/tar/manual/html_chapter/tar_8.html#SEC134
*/
function _writeFooter() { function _writeFooter() {
$this->_write(pack("a512", "")); $this->_write(pack("a512", ""));
$this->_write(pack("a512", ""));
} }
function _extractList($p_to, $p_files, $p_remdir, $p_mode = 0755) { function _extractList($p_to, $p_files, $p_remdir, $p_mode = 0755) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment