mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 15:03:25 +00:00
fix #262 : archive task / waiting for a 'magic file' in any subfolder locked whole archiving
This commit is contained in:
@@ -825,7 +825,20 @@ class task_period_archive extends task_abstract
|
||||
|
||||
$xp = new DOMXPath($dom);
|
||||
|
||||
while (($file = $listFolder->read()) !== NULL)
|
||||
if(($sxDotPhrasea = @simplexml_load_file($path . '/.phrasea.xml')))
|
||||
{
|
||||
// on gere le magicfile
|
||||
if(($magicfile = trim((string) ($sxDotPhrasea->magicfile))) != '')
|
||||
{
|
||||
$magicmethod = strtoupper($sxDotPhrasea->magicfile['method']);
|
||||
if($magicmethod == 'LOCK' && file_exists($path . '/' . $magicfile))
|
||||
return;
|
||||
elseif($magicmethod == 'UNLOCK' && !file_exists($path . '/' . $magicfile))
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
while(($file = $listFolder->read()) !== NULL)
|
||||
{
|
||||
if ($this->isIgnoredFile($file))
|
||||
continue;
|
||||
|
Reference in New Issue
Block a user