mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-12-26 09:03:48 +08:00
This commit is contained in:
parent
514fe02619
commit
a21147e234
2 changed files with 13 additions and 7 deletions
|
@ -48,13 +48,15 @@ if (isset($options['plugins'])) {
|
|||
@unlink($tgz_destination);
|
||||
@unlink("{$tar_destination}.gz");
|
||||
$tar = new PharData($tar_destination);
|
||||
$tar->buildFromDirectory('./plugins/', "@{$name}@");
|
||||
$tar->buildFromDirectory('./plugins/', '/' . \preg_quote("./plugins/{$name}", '/') . '/');
|
||||
$tar->compress(Phar::GZ);
|
||||
unlink($tar_destination);
|
||||
rename("{$tar_destination}.gz", $tgz_destination);
|
||||
} else {
|
||||
echo "- {$name} {$version}\n";
|
||||
}
|
||||
} else {
|
||||
echo "- {$name}\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -136,12 +136,16 @@ class Manager
|
|||
{
|
||||
foreach ($aGlob as $sPathName)
|
||||
{
|
||||
$sName = \basename($sPathName);
|
||||
$sClassName = $this->loadPluginByName($sName);
|
||||
$aList[] = array(
|
||||
$sName,
|
||||
$sClassName::VERSION
|
||||
);
|
||||
try {
|
||||
$sName = \basename($sPathName);
|
||||
$sClassName = $this->loadPluginByName($sName);
|
||||
$aList[] = array(
|
||||
$sName,
|
||||
$sClassName::VERSION
|
||||
);
|
||||
} catch (\Throwable $e) {
|
||||
\error_log($e->getMessage() . "\n\t{$sPathName}");
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue