From a21147e234414ee6278ff2a8b39c14f46dfc9e4c Mon Sep 17 00:00:00 2001 From: djmaze Date: Wed, 3 Mar 2021 22:50:13 +0100 Subject: [PATCH] https://github.com/the-djmaze/snappymail/issues/51#issuecomment-790085303 --- release.php | 4 +++- .../app/libraries/RainLoop/Plugins/Manager.php | 16 ++++++++++------ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/release.php b/release.php index a317a94d4..997a2eff3 100755 --- a/release.php +++ b/release.php @@ -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"; } } diff --git a/snappymail/v/0.0.0/app/libraries/RainLoop/Plugins/Manager.php b/snappymail/v/0.0.0/app/libraries/RainLoop/Plugins/Manager.php index 69e8a5902..92c789771 100644 --- a/snappymail/v/0.0.0/app/libraries/RainLoop/Plugins/Manager.php +++ b/snappymail/v/0.0.0/app/libraries/RainLoop/Plugins/Manager.php @@ -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