From 262608544f745aacd0d47556423eed77a0a6d9ae Mon Sep 17 00:00:00 2001 From: Jay Trees Date: Wed, 29 May 2024 16:45:33 +0200 Subject: [PATCH] fix(installer): attempt to create cache directory --- src/pages/install.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/pages/install.php b/src/pages/install.php index 2ac483d5..cc1412c8 100644 --- a/src/pages/install.php +++ b/src/pages/install.php @@ -94,6 +94,14 @@ switch ($step) { * Check prerequisites */ case 2: + $directoryCache = ROOT . '/src/cache'; + + /** + * Attempt to create the cache directory, since it doesn't exist by + * default. + */ + @\mkdir($directoryCache); + $prerequisites = [ [ 'filename' => __('PHP Version >= 8.1'), @@ -117,13 +125,13 @@ switch ($step) { [ 'filename' => '/src/cache', 'icon' => 'folder', - 'condition' => \file_exists(ROOT . '/src/cache') && \is_dir(ROOT . '/src/cache'), + 'condition' => \file_exists($directoryCache) && \is_dir($directoryCache), 'label' => __('Exists'), ], [ 'filename' => '/src/cache', 'icon' => 'folder', - 'condition' => \is_writeable(ROOT . '/src/cache'), + 'condition' => \is_writeable($directoryCache), 'label' => __('Writeable'), ],