System update (better installation)

This commit is contained in:
markseu 2016-07-30 02:58:14 +02:00
parent 853b17f1de
commit 42e9e96321
3 changed files with 9 additions and 4 deletions

View file

@ -249,8 +249,13 @@ class YellowUpdate
if(preg_match("/$feature/i", basename($entry)))
{
if($this->updateSoftwareArchive($entry)!=200) $ok = false;
} else {
if(!$this->yellow->toolbox->deleteFile($entry)) $ok = false;
}
}
if($ok)
{
foreach($this->yellow->toolbox->getDirectoryEntries($path, $regex, true, false) as $entry)
{
$this->yellow->toolbox->deleteFile($entry);
}
}
return $ok;
@ -411,9 +416,9 @@ class YellowUpdate
$regex = "/^.*\\".$this->yellow->config->get("downloadExtension")."$/";
foreach($this->yellow->toolbox->getDirectoryEntries($path, $regex, true, false, false) as $entry)
{
if(preg_match("/^installation-(.*?)\\./", $entry, $matches))
if(preg_match("/^(.*?)-(.*?)\./", $entry, $matches))
{
array_push($data, $matches[1]);
array_push($data, $matches[2]);
}
}
return $data;