diff options
author | Paul S. Owen <psotfx@users.sourceforge.net> | 2003-08-13 16:43:58 +0000 |
---|---|---|
committer | Paul S. Owen <psotfx@users.sourceforge.net> | 2003-08-13 16:43:58 +0000 |
commit | e46f4cb50550bd00ad9dfd64090884c764877737 (patch) | |
tree | e54e61f008e4b495ff79fddf3b40bed81e657bcb /phpBB/includes/functions_compress.php | |
parent | 321eb7eedc4d12ed11ad257aa21d04dae30f86b0 (diff) | |
download | forums-e46f4cb50550bd00ad9dfd64090884c764877737.tar forums-e46f4cb50550bd00ad9dfd64090884c764877737.tar.gz forums-e46f4cb50550bd00ad9dfd64090884c764877737.tar.bz2 forums-e46f4cb50550bd00ad9dfd64090884c764877737.tar.xz forums-e46f4cb50550bd00ad9dfd64090884c764877737.zip |
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
Diffstat (limited to 'phpBB/includes/functions_compress.php')
-rw-r--r-- | phpBB/includes/functions_compress.php | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/phpBB/includes/functions_compress.php b/phpBB/includes/functions_compress.php index 9a70bd9fc0..5aabc1b592 100644 --- a/phpBB/includes/functions_compress.php +++ b/phpBB/includes/functions_compress.php @@ -417,12 +417,24 @@ class compress_tar extends compress { $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 - 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); foreach ($mkdir_ary as $dir) { @@ -460,7 +472,7 @@ class compress_tar extends compress $tmp = unpack("Atype", substr($buffer, 156, 1)); $filetype = (int) trim($tmp['type']); - if ($filetype != 5) + if ($filetype == 0 || $filetype == "\0") { $tmp = unpack("A12size", substr($buffer, 124, 12)); $filesize = octdec((int) trim($tmp['size'])); |