fix is_* check

This commit is contained in:
Dennis Eichhorn 2020-10-08 15:34:05 +02:00
parent 005f169e48
commit 06070dcac2
2 changed files with 3 additions and 3 deletions

View File

@ -663,7 +663,7 @@ final class ModuleManager
*/
public function installApplications(string $from) : void
{
if (!\file_exists($this->modulePath . '/' . $from . '/Application')) {
if (!\is_dir($this->modulePath . '/' . $from . '/Application')) {
return;
}

View File

@ -135,7 +135,7 @@ final class PackageManager
*/
public function isValid() : bool
{
if (!\is_dir($this->extractPath . '/package.cert')) {
if (!\is_file($this->extractPath . '/package.cert')) {
return false;
}
@ -156,7 +156,7 @@ final class PackageManager
$state = \sodium_crypto_generichash_init();
foreach ($files as $file) {
if ($file === 'package.cert' || \is_dir($this->extractPath . '/' . $file)) {
if ($file === 'package.cert' || \is_file($this->extractPath . '/' . $file)) {
continue;
}