Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"microsoft/azure-storage-blob": "^1.5.4",
"mlocati/ip-lib": "^1.22",
"nextcloud/lognormalizer": "^3.0.1",
"pear/archive_tar": "^1.4.9",
"pear/archive_tar": "^1.6.0",
"pear/pear-core-minimal": "^1.10",
"php-http/guzzle7-adapter": "^1.1.0",
"php-opencloud/openstack": "^3.14",
Expand Down
24 changes: 12 additions & 12 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 13 additions & 13 deletions composer/installed.json
Original file line number Diff line number Diff line change
Expand Up @@ -2562,22 +2562,22 @@
},
{
"name": "pear/archive_tar",
"version": "1.5.0",
"version_normalized": "1.5.0.0",
"version": "1.6.0",
"version_normalized": "1.6.0.0",
"source": {
"type": "git",
"url": "https://github.com/pear/Archive_Tar.git",
"reference": "b439c859564f5cbb0f64ad6002d0afe84a889602"
"reference": "dc3285537f1832da8ddbbe45f5a007248b6cc00e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/pear/Archive_Tar/zipball/b439c859564f5cbb0f64ad6002d0afe84a889602",
"reference": "b439c859564f5cbb0f64ad6002d0afe84a889602",
"url": "https://api.github.com/repos/pear/Archive_Tar/zipball/dc3285537f1832da8ddbbe45f5a007248b6cc00e",
"reference": "dc3285537f1832da8ddbbe45f5a007248b6cc00e",
"shasum": ""
},
"require": {
"pear/pear-core-minimal": "^1.10.0alpha2",
"php": ">=5.2.0"
"php": ">=5.4.0"
},
"require-dev": {
"phpunit/phpunit": "*"
Expand All @@ -2587,7 +2587,7 @@
"ext-xz": "Lzma2 compression support.",
"ext-zlib": "Gzip compression support."
},
"time": "2024-03-16T16:21:40+00:00",
"time": "2025-07-19T14:49:16+00:00",
"type": "library",
"extra": {
"branch-alias": {
Expand Down Expand Up @@ -2689,17 +2689,17 @@
},
{
"name": "pear/pear-core-minimal",
"version": "v1.10.16",
"version_normalized": "1.10.16.0",
"version": "v1.10.18",
"version_normalized": "1.10.18.0",
"source": {
"type": "git",
"url": "https://github.com/pear/pear-core-minimal.git",
"reference": "c0f51b45f50683bf5bbf558036854ebc9b54d033"
"reference": "c7b55789d01de0ce090d289b73f1bbd6a2f113b1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/pear/pear-core-minimal/zipball/c0f51b45f50683bf5bbf558036854ebc9b54d033",
"reference": "c0f51b45f50683bf5bbf558036854ebc9b54d033",
"url": "https://api.github.com/repos/pear/pear-core-minimal/zipball/c7b55789d01de0ce090d289b73f1bbd6a2f113b1",
"reference": "c7b55789d01de0ce090d289b73f1bbd6a2f113b1",
"shasum": ""
},
"require": {
Expand All @@ -2710,7 +2710,7 @@
"replace": {
"rsky/pear-core-min": "self.version"
},
"time": "2024-11-24T22:27:58+00:00",
"time": "2025-12-14T20:37:07+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
Expand Down
14 changes: 7 additions & 7 deletions composer/installed.php
Original file line number Diff line number Diff line change
Expand Up @@ -350,9 +350,9 @@
),
),
'pear/archive_tar' => array(
'pretty_version' => '1.5.0',
'version' => '1.5.0.0',
'reference' => 'b439c859564f5cbb0f64ad6002d0afe84a889602',
'pretty_version' => '1.6.0',
'version' => '1.6.0.0',
'reference' => 'dc3285537f1832da8ddbbe45f5a007248b6cc00e',
'type' => 'library',
'install_path' => __DIR__ . '/../pear/archive_tar',
'aliases' => array(),
Expand All @@ -368,9 +368,9 @@
'dev_requirement' => false,
),
'pear/pear-core-minimal' => array(
'pretty_version' => 'v1.10.16',
'version' => '1.10.16.0',
'reference' => 'c0f51b45f50683bf5bbf558036854ebc9b54d033',
'pretty_version' => 'v1.10.18',
'version' => '1.10.18.0',
'reference' => 'c7b55789d01de0ce090d289b73f1bbd6a2f113b1',
'type' => 'library',
'install_path' => __DIR__ . '/../pear/pear-core-minimal',
'aliases' => array(),
Expand Down Expand Up @@ -601,7 +601,7 @@
'rsky/pear-core-min' => array(
'dev_requirement' => false,
'replaced' => array(
0 => 'v1.10.16',
0 => 'v1.10.18',
),
),
'sabre/dav' => array(
Expand Down
112 changes: 46 additions & 66 deletions pear/archive_tar/Archive/Tar.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,27 +48,6 @@
define('ARCHIVE_TAR_ATT_SEPARATOR', 90001);
define('ARCHIVE_TAR_END_BLOCK', pack("a512", ''));

if (!function_exists('gzopen') && function_exists('gzopen64')) {
function gzopen($filename, $mode, $use_include_path = 0)
{
return gzopen64($filename, $mode, $use_include_path);
}
}

if (!function_exists('gztell') && function_exists('gztell64')) {
function gztell($zp)
{
return gztell64($zp);
}
}

if (!function_exists('gzseek') && function_exists('gzseek64')) {
function gzseek($zp, $offset, $whence = SEEK_SET)
{
return gzseek64($zp, $offset, $whence);
}
}

/**
* Creates a (compressed) Tar archive
*
Expand Down Expand Up @@ -244,7 +223,7 @@ public function __construct($p_tarname, $p_compress = null, $buffer_length = 512
"a8checksum/a1typeflag/a100link/a6magic/a2version/" .
"a32uname/a32gname/a8devmajor/a8devminor/a131prefix";
} else {
$this->_fmt = "Z100filename/Z8mode/Z8uid/Z8gid/Z12size/Z12mtime/" .
$this->_fmt = "Z100filename/Z8mode/Z8uid/Z8gid/a12size/Z12mtime/" .
"Z8checksum/Z1typeflag/Z100link/Z6magic/Z2version/" .
"Z32uname/Z32gname/Z8devmajor/Z8devminor/Z131prefix";
}
Expand Down Expand Up @@ -991,48 +970,45 @@ public function _writeBlock($p_binary_data, $p_len = null)
{
if (is_resource($this->_file)) {
if ($p_len === null) {
if ($this->_compress_type == 'gz') {
@gzputs($this->_file, $p_binary_data);
} else {
if ($this->_compress_type == 'bz2') {
@bzwrite($this->_file, $p_binary_data);
} else {
if ($this->_compress_type == 'lzma2') {
@xzwrite($this->_file, $p_binary_data);
} else {
if ($this->_compress_type == 'none') {
@fputs($this->_file, $p_binary_data);
} else {
$this->_error(
'Unknown or missing compression type ('
. $this->_compress_type . ')'
);
}
}
}
}
} else {
if ($this->_compress_type == 'gz') {
@gzputs($this->_file, $p_binary_data, $p_len);
} else {
if ($this->_compress_type == 'bz2') {
@bzwrite($this->_file, $p_binary_data, $p_len);
} else {
if ($this->_compress_type == 'lzma2') {
@xzwrite($this->_file, $p_binary_data, $p_len);
} else {
if ($this->_compress_type == 'none') {
@fputs($this->_file, $p_binary_data, $p_len);
} else {
$this->_error(
'Unknown or missing compression type ('
. $this->_compress_type . ')'
);
}
}
}
}
switch ($this->_compress_type)
{
case 'gz':
$bytes = @gzwrite($this->_file, $p_binary_data);
break;
case 'bz2':
$bytes = @bzwrite($this->_file, $p_binary_data);
break;
case 'lzma2':
$bytes = @xzwrite($this->_file, $p_binary_data);
break;
case 'none':
$bytes = @fwrite($this->_file, $p_binary_data);
break;
default:
$this->_error('Unknown or missing compression type (' . $this->_compress_type . ')');
return false;
}
} else {
switch ($this->_compress_type)
{
case 'gz':
$bytes = @gzwrite($this->_file, $p_binary_data, $p_len);
break;
case 'bz2':
$bytes = @bzwrite($this->_file, $p_binary_data, $p_len);
break;
case 'lzma2':
$bytes = @xzwrite($this->_file, $p_binary_data, $p_len);
break;
case 'none':
$bytes = @fwrite($this->_file, $p_binary_data, $p_len);
break;
default:
$this->_error('Unknown or missing compression type (' . $this->_compress_type . ')');
return false;
}
}
return $bytes !== false;
}
return true;
}
Expand Down Expand Up @@ -1117,7 +1093,7 @@ public function _writeFooter()
if (is_resource($this->_file)) {
// ----- Write the last 0 filled block for end of archive
$v_binary_data = pack('a1024', '');
$this->_writeBlock($v_binary_data);
return $this->_writeBlock($v_binary_data);
}
return true;
}
Expand Down Expand Up @@ -1279,7 +1255,9 @@ public function _addFile($p_filename, &$p_header, $p_add_dir, $p_remove_dir, $v_
$pack_format = sprintf('a%d', $this->buffer_length);
}
$v_binary_data = pack($pack_format, "$v_buffer");
$this->_writeBlock($v_binary_data);
if(!$this->_writeBlock($v_binary_data)) {
return false;
}
}

fclose($v_file);
Expand Down Expand Up @@ -1341,7 +1319,9 @@ public function _addString($p_filename, $p_string, $p_datetime = false, $p_param
$i = 0;
while (($v_buffer = substr($p_string, (($i++) * 512), 512)) != '') {
$v_binary_data = pack("a512", $v_buffer);
$this->_writeBlock($v_binary_data);
if (!$this->_writeBlock($v_binary_data)) {
return false;
}
}

return true;
Expand Down
Loading