aboutsummaryrefslogtreecommitdiff
path: root/lib/lib_rss.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2023-05-28 18:03:34 +0200
committerGravatar GitHub <noreply@github.com> 2023-05-28 18:03:34 +0200
commit0292b2f1f3a8cba3179467bba6c6af6bd0e97453 (patch)
tree65f2b10459c6046bc74556298a90d93187e80f1e /lib/lib_rss.php
parenteeefbdf9c720790b83cc82fd981929bf4d699120 (diff)
Improve Dev Container (#5423)
* Improve Dev Container PHPStan was failing in Dev Container * Update Docker to Alpine Linux 3.18 * New DATA_PATH environment variable * README
Diffstat (limited to 'lib/lib_rss.php')
-rw-r--r--lib/lib_rss.php20
1 files changed, 7 insertions, 13 deletions
diff --git a/lib/lib_rss.php b/lib/lib_rss.php
index 1ae99e6a1..01ec7fa98 100644
--- a/lib/lib_rss.php
+++ b/lib/lib_rss.php
@@ -724,26 +724,20 @@ function check_install_php(): array {
);
}
-
/**
* Check different data files and directories exist.
- *
* @return array<string,bool> of tested values.
*/
function check_install_files(): array {
- return array(
- // @phpstan-ignore-next-line
- 'data' => DATA_PATH && touch(DATA_PATH . '/index.html'), // is_writable() is not reliable for a folder on NFS
- // @phpstan-ignore-next-line
- 'cache' => CACHE_PATH && touch(CACHE_PATH . '/index.html'),
- // @phpstan-ignore-next-line
- 'users' => USERS_PATH && touch(USERS_PATH . '/index.html'),
- 'favicons' => touch(DATA_PATH . '/favicons/index.html'),
- 'tokens' => touch(DATA_PATH . '/tokens/index.html'),
- );
+ return [
+ 'data' => is_dir(DATA_PATH) && touch(DATA_PATH . '/index.html'), // is_writable() is not reliable for a folder on NFS
+ 'cache' => is_dir(CACHE_PATH) && touch(CACHE_PATH . '/index.html'),
+ 'users' => is_dir(USERS_PATH) && touch(USERS_PATH . '/index.html'),
+ 'favicons' => is_dir(DATA_PATH) && touch(DATA_PATH . '/favicons/index.html'),
+ 'tokens' => is_dir(DATA_PATH) && touch(DATA_PATH . '/tokens/index.html'),
+ ];
}
-
/**
* Check database is well-installed.
*