mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-02 23:07:39 +02:00
check if folder is not empty (may happen for absolute paths). Thanks paul
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8639 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -215,6 +215,12 @@ class compress_zip extends compress
|
|||||||
// Create and folders and subfolders if they do not exist
|
// Create and folders and subfolders if they do not exist
|
||||||
foreach ($folders as $folder)
|
foreach ($folders as $folder)
|
||||||
{
|
{
|
||||||
|
$folder = trim($folder);
|
||||||
|
if (!$folder)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
$str = (!empty($str)) ? $str . '/' . $folder : $folder;
|
$str = (!empty($str)) ? $str . '/' . $folder : $folder;
|
||||||
if (!is_dir($str))
|
if (!is_dir($str))
|
||||||
{
|
{
|
||||||
@@ -238,6 +244,12 @@ class compress_zip extends compress
|
|||||||
// Create and folders and subfolders if they do not exist
|
// Create and folders and subfolders if they do not exist
|
||||||
foreach ($folders as $folder)
|
foreach ($folders as $folder)
|
||||||
{
|
{
|
||||||
|
$folder = trim($folder);
|
||||||
|
if (!$folder)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
$str = (!empty($str)) ? $str . '/' . $folder : $folder;
|
$str = (!empty($str)) ? $str . '/' . $folder : $folder;
|
||||||
if (!is_dir($str))
|
if (!is_dir($str))
|
||||||
{
|
{
|
||||||
@@ -519,6 +531,12 @@ class compress_tar extends compress
|
|||||||
// Create and folders and subfolders if they do not exist
|
// Create and folders and subfolders if they do not exist
|
||||||
foreach ($folders as $folder)
|
foreach ($folders as $folder)
|
||||||
{
|
{
|
||||||
|
$folder = trim($folder);
|
||||||
|
if (!$folder)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
$str = (!empty($str)) ? $str . '/' . $folder : $folder;
|
$str = (!empty($str)) ? $str . '/' . $folder : $folder;
|
||||||
if (!is_dir($str))
|
if (!is_dir($str))
|
||||||
{
|
{
|
||||||
@@ -540,6 +558,12 @@ class compress_tar extends compress
|
|||||||
// Create and folders and subfolders if they do not exist
|
// Create and folders and subfolders if they do not exist
|
||||||
foreach ($folders as $folder)
|
foreach ($folders as $folder)
|
||||||
{
|
{
|
||||||
|
$folder = trim($folder);
|
||||||
|
if (!$folder)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
$str = (!empty($str)) ? $str . '/' . $folder : $folder;
|
$str = (!empty($str)) ? $str . '/' . $folder : $folder;
|
||||||
if (!is_dir($str))
|
if (!is_dir($str))
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user