summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2012-11-03 09:36:47 +0100
committerAndreas Gohr <andi@splitbrain.org>2012-11-03 09:36:47 +0100
commitcb70b76ca19e8ebbcd55ec7b79fd40cfce074335 (patch)
treef8678044a0f64ac54eed485fd998dd95504f1b5b
parentd922c55256c59ee6ee332a4db8740a01e559dcee (diff)
downloadrpg-cb70b76ca19e8ebbcd55ec7b79fd40cfce074335.tar.gz
rpg-cb70b76ca19e8ebbcd55ec7b79fd40cfce074335.tar.bz2
fix lone zero block in TarLib created archives
-rw-r--r--inc/TarLib.class.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/inc/TarLib.class.php b/inc/TarLib.class.php
index ce27409fd..55cd1c3c7 100644
--- a/inc/TarLib.class.php
+++ b/inc/TarLib.class.php
@@ -715,8 +715,16 @@ class TarLib {
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() {
$this->_write(pack("a512", ""));
+ $this->_write(pack("a512", ""));
}
function _extractList($p_to, $p_files, $p_remdir, $p_mode = 0755) {