mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
Seems some compression applications don't bother with little things like standards ...
git-svn-id: file:///svn/phpbb/trunk@4399 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
321eb7eedc
commit
e46f4cb505
1 changed files with 14 additions and 2 deletions
|
@ -417,12 +417,24 @@ class compress_tar extends compress
|
||||||
{
|
{
|
||||||
$mkdir_ary[] = "$dst$filename";
|
$mkdir_ary[] = "$dst$filename";
|
||||||
}
|
}
|
||||||
|
else if (dirname($filename) != '.')
|
||||||
|
{
|
||||||
|
$mkdir_alt_ary[] = $dst . dirname($filename);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$mkdir_alt_ary = array_unique($mkdir_alt_ary);
|
||||||
|
|
||||||
// Create the directory structure
|
// Create the directory structure
|
||||||
if (is_array($mkdir_ary))
|
if (sizeof($mkdir_ary) || sizeof($mkdir_alt_ary))
|
||||||
{
|
{
|
||||||
|
if (!sizeof($mkdir_ary) && sizeof($mkdir_alt_ary))
|
||||||
|
{
|
||||||
|
$mkdir_ary = $mkdir_alt_ary;
|
||||||
|
unset($mkdir_alt_ary);
|
||||||
|
}
|
||||||
|
|
||||||
sort($mkdir_ary);
|
sort($mkdir_ary);
|
||||||
foreach ($mkdir_ary as $dir)
|
foreach ($mkdir_ary as $dir)
|
||||||
{
|
{
|
||||||
|
@ -460,7 +472,7 @@ class compress_tar extends compress
|
||||||
$tmp = unpack("Atype", substr($buffer, 156, 1));
|
$tmp = unpack("Atype", substr($buffer, 156, 1));
|
||||||
$filetype = (int) trim($tmp['type']);
|
$filetype = (int) trim($tmp['type']);
|
||||||
|
|
||||||
if ($filetype != 5)
|
if ($filetype == 0 || $filetype == "\0")
|
||||||
{
|
{
|
||||||
$tmp = unpack("A12size", substr($buffer, 124, 12));
|
$tmp = unpack("A12size", substr($buffer, 124, 12));
|
||||||
$filesize = octdec((int) trim($tmp['size']));
|
$filesize = octdec((int) trim($tmp['size']));
|
||||||
|
|
Loading…
Add table
Reference in a new issue