mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
- Some archivers are worthless in this world
git-svn-id: file:///svn/phpbb/trunk@5786 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
164b55b394
commit
ea71c3046d
1 changed files with 20 additions and 0 deletions
|
@ -200,6 +200,26 @@ class compress_zip extends compress
|
|||
// This is a directory, we are not writting files
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Some archivers are punks, they don't don't include folders in their archives!
|
||||
$str = '';
|
||||
$folders = explode('/', pathinfo($target_filename, PATHINFO_DIRNAME));
|
||||
|
||||
// Create and folders and subfolders if they do not exist
|
||||
foreach ($folders as $folder)
|
||||
{
|
||||
$str = (!empty($str)) ? $str . '/' . $folder : $folder;
|
||||
if (!is_dir($str))
|
||||
{
|
||||
if (!@mkdir($str, 0777))
|
||||
{
|
||||
trigger_error("Could not create directory $folder");
|
||||
}
|
||||
@chmod($str, 0777);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!$data['uc_size'])
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue