From 06070dcac2e56258ade85f530abdc9120744207d Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Thu, 8 Oct 2020 15:34:05 +0200 Subject: [PATCH] fix is_* check --- Module/ModuleManager.php | 2 +- Module/PackageManager.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Module/ModuleManager.php b/Module/ModuleManager.php index f28ec1d3e..d26d18696 100644 --- a/Module/ModuleManager.php +++ b/Module/ModuleManager.php @@ -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; } diff --git a/Module/PackageManager.php b/Module/PackageManager.php index 303403178..f39dff917 100644 --- a/Module/PackageManager.php +++ b/Module/PackageManager.php @@ -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; }